#784 TIFF: No longer return incorrect standard image type for RGB with custom ICC profile

(cherry picked from commit b2f7cada21cec266ec1cc770c9ca669080f71f9b)
This commit is contained in:
Harald Kuhr 2023-07-17 12:08:43 +02:00
parent c8cb472407
commit 92ba91b412

View File

@ -910,7 +910,7 @@ public final class TIFFImageReader extends ImageReaderBase {
Set<ImageTypeSpecifier> specs = new LinkedHashSet<>(5);
// TODO: Based on raw type, we can probably convert to most RGB types at least, maybe gray etc
if (rawType.getColorModel().getColorSpace().getType() == ColorSpace.TYPE_RGB) {
if (rawType.getColorModel().getColorSpace().isCS_sRGB()) {
if (rawType.getNumBands() == 3 && rawType.getBitsPerBand(0) == 8) {
specs.add(ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_3BYTE_BGR));
// specs.add(ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_BGR));