RFR: 8351108: ImageIO.write(..) fails with exception when writing JPEG with IndexColorModel [v6]

duke duke at openjdk.org
Wed Mar 12 18:15:05 UTC 2025


On Tue, 11 Mar 2025 21:47:38 GMT, Jeremy Wood <duke at openjdk.org> wrote:

>> Previously ImageTypeSpecifier treated all TYPE_BYTE_INDEXED as if they were opaque.
>> 
>> In this ticket's case: an ImageWriter received the wrong ImageTypeSpecifier and mistakenly indicated it *could* support a BufferedImage. But when the actual BufferedImage arrived (which was translucent), the ImageWriter threw an exception.
>> 
>> Instead:
>> Now the ImageTypeSpecifier accurately describes the given BufferedImage.
>
> Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update test/jdk/javax/imageio/plugins/jpeg/JpegWriterWriteNonOpaqueIndexColorModelTest.java
>   
>   Co-authored-by: Alexey Ivanov <alexey.ivanov at oracle.com>

@mickleness 
Your change (at version b0a0b75e16f239f7182b5b2923941c05529e8815) is now ready to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/23884#issuecomment-2718715619


More information about the client-libs-dev mailing list