WebP and AVIF image support
Andy Goryachev
andy.goryachev at oracle.com
Wed Dec 3 20:09:36 UTC 2025
And HEIC.
-andy
From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Glavo <zjx001202 at gmail.com>
Date: Wednesday, December 3, 2025 at 12:01
To: openjfx-dev <openjfx-dev at openjdk.org>
Subject: WebP and AVIF image support
Hi,
The image formats supported by JavaFX have not been updated for a very long time. However, more and more content providers are now adopting newer formats such as WebP and AVIF.
For example, our application needs to display icons for Minecraft mods, modpacks, and other content sourced from Modrinth, and the vast majority of these icons are in WebP format. To work around this, we currently have to bundle TwelveMonkeys into our program, decode the images to BufferedImage, and then convert them to javafx.scene.image.Image. This approach significantly increases the size of our application, adds considerable performance overhead, does not support animated WebP, and even has a color-shift bug when decoding lossy-compressed WebP images.
Is there any possibility that JavaFX will add native support for modern image formats like WebP and AVIF in the future? I noticed that the javafx.web module already depends on libwebp during its build, yet this dependency is not utilized for javafx.scene.image.Image decoding—which is honestly a bit of a shame. We sincerely hope that JavaFX can provide native support for these formats.
Glavo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251203/78581520/attachment.htm>
More information about the openjfx-dev
mailing list