RFR: 8351108: ImageIO.write(..) fails with exception when writing JPEG with IndexColorModel
Jeremy
duke at openjdk.org
Tue Mar 4 06:57:06 UTC 2025
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.
-------------
Commit messages:
- 8351108: images that are TYPE_BYTE_INDEXED can vary in translucency
- 8351108: adding failing unit test from ticket
- Merge branch 'openjdk:master' into master
- Merge branch 'openjdk:master' into master
- Merge pull request #5 from openjdk/master
- Merge pull request #4 from openjdk/master
- Merge pull request #3 from openjdk/master
- Merge pull request #2 from openjdk/master
- Merge pull request #1 from openjdk/master
Changes: https://git.openjdk.org/jdk/pull/23884/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23884&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8351108
Stats: 85 lines in 2 files changed: 84 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23884.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23884/head:pull/23884
PR: https://git.openjdk.org/jdk/pull/23884
More information about the client-libs-dev
mailing list