Open GoogleCodeExporter opened 9 years ago
Yes these are pretty raw and undocumented. A sample beyond what's in
swig/README would help for all of these. They do attempt to wrap the simple
encoding/decoding interfaces with minimal changes so the docs from
webp/decode.h and webp/encode.h may help. Regenerating the source from the
.swig would give you the java to look at.
Decoding can be done with something like:
byte[] data = new byte[(int) inputFile.length()];
int[] width = new int[1];
int[] height = new int[1];
byte[] rgb = libwebp.WebPDecodeRGB(data, data.length, width, height);
Note there's an image I/O plugin [1] that may serve you better.
[1] https://bitbucket.org/luciad/webp-imageio
Original comment by jz...@google.com
on 20 Apr 2014 at 2:58
Original issue reported on code.google.com by
thinkabu...@gmail.com
on 19 Apr 2014 at 10:07