For a long time, we hadn’t been able to find a satisfactory WebP library for JavaFX.
The library that came closest to meeting our needs was TwelveMonkeys, but it does not support animated WebP images, and it also has color issues when decoding lossy WebP images.
To solve this problem, I ported the WebP decoder implementation from image-rs to pure Java, with a dependency only on the java.base module.
It supports reading both lossy and lossless WebP images, supports animated WebP, and provides good integration with JavaFX.
Here is the GitHub repository:
I hope this can help others who also need to read WebP images in Java :)
Glavo