Skip to content

Commit

Permalink
#784 TIFF: No longer return incorrect standard image type for RGB wit…
Browse files Browse the repository at this point in the history
…h custom ICC profile

(cherry picked from commit b2f7cad)
  • Loading branch information
haraldk committed Jul 19, 2023
1 parent c8cb472 commit 92ba91b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOExcep
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));
Expand Down

0 comments on commit 92ba91b

Please sign in to comment.