6

Is there a library in java for producing/consuming image files in the WebP format? The libraries I found online are either libwebp written in C, or its JNI bindings in Java. Is there anything in pure Java?

1
2

TwelveMonkeys ImageIO now has full ImageIO read support for WebP (lossy). We are working on implementing lossless and extended (lossy + lossless alpha) modes.


Another free option is the ImageIO plugin from Java VP8 Decoder. It contains a Java implementation of the VP8 codec.

Another candidate is JCodec, which have Java VP8 encoding and decoding, but no ImageIO plugin, as far as I can see.


As correctly pointed out by the OP, the VP8 key frame encoding is the method used in WebP for lossy encoding only. The format also specifies lossless encoding, and a combination of lossy RGB + lossless alpha. The above projects does not implement any of these.

1
  • 1
    Sorry that I'm not familiar with WebP. Is VP8 equivalent to WebP? From Google documentation, VP8 key frame encoding is only one way to encode the WebP image. There is also WebP lossless encoding. – Franklin Yu Nov 30 '17 at 17:11
1

JDeli can read/write WebP format and many others, but it isn't free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.