On Wed, 16 Oct 2024 14:30:12 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

>> 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.

TYPE_BYTE_INDEXED is used in common TIFF ImageIO readers for monochrome 
compressions.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1593#discussion_r1803273366

Reply via email to