On Wed, 7 Oct 2026 04:03:14 GMT, Sergey Bylokhov <[email protected]> wrote:
>> Phil Race has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> JpegQTableTest.java
>
> src/java.desktop/share/native/libjavajpeg/imageioJPEG.c line 734:
>
>> 732: if (quant_ptr->quantval[j] > 255) { // ImageIO supports
>> baseline only
>> 733: quant_ptr->quantval[j] = 255;
>> 734: }
>
> There is a place where the clamp to 8-bit is used only if baseline is set,
> otherwise the 16-bit is used: [int max = (forceBaseline) ? 255 :
> 32767;](https://github.com/openjdk/jdk/blob/f2fd22f7a23505bef47227a97a51bc9e1837111e/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGQTable.java#L179).
> I think it should be possible to trigger the usage of such JPEGQTable by the
> test and confirm that the 16 is actually used when the image is saved/read?
I don't fully understand the suggestion.
But I've created a test for this that validates that the data is corrected
during write.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33217#discussion_r4234888295