RFR: 8306707: Support pluggable image loading via javax.imageio [v3]
Michael Strauß
mstrauss at openjdk.org
Wed Oct 16 14:33:21 UTC 2024
On Tue, 15 Oct 2024 22:04:42 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review changes
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/iio/javax/XImageLoader.java line 203:
>
>> 201: case TYPE_BYTE_INDEXED -> "TYPE_BYTE_INDEXED";
>> 202: default -> Integer.toString(image.getType());
>> 203: });
>
> Hm, since we can't select which format an image reader will output, lacking conversions for these can mean that a lot of AWT supported image formats still can't be loaded in FX. For some formats that can have multiple representations that can mean some images load while others won't. For example, if GIF wasn't natively supported, then it wouldn't work via ImageIO either (since it is TYPE_BYTE_INDEXED afaik).
>
> I also wonder what SVG will generally output (`TYPE_BYTE_GRAY`?)
Yes, but I don't know which modern image format that people would want to load is using indexed colors. If it turns out that there is a pressing need, this might be better split off into another work package.
SVG produces `TYPE_INT_ARGB_PRE` in my tests.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1593#discussion_r1803231167
More information about the openjfx-dev
mailing list