[ https://issues.apache.org/jira/browse/IMAGING-361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Lucas updated IMAGING-361: ------------------------------- Description: When TiffImageParser.getImageInfo() creates an ImageInfo object, it has a hard-wired value for ColorType of RGB. So images with color models such as CMYK or YCbCr are reported as RGB. It should look at the Photometric Interpretation tag and assign a value accordingly. Note that this issue has nothing to do with the kind of BufferedImage that other methods will produce. A code fix would only affect the values reported in ImageInfo. The problem code is currently at line 534 in TiffImageParser.java, but examples of accessing other TIFF tags are located nearby in the code. {code:java} final ImageInfo.ColorType colorType = ImageInfo.ColorType.RGB {code} was: When TiffImageParser.getImageInfo() creates an ImageInfo object, it has a hard-wired value for ColorType of RGB. So images with color models such as CMYK or YCbCr are reported as RGB. It should look at the Photometric Interpretation tag and assign a value accordingly. Note that this issue has nothing to do with the kind of BufferedImage that other methods will produce. A code fix would only affect the values reported in ImageInfo. The problem code is currently at line 534 in TiffImageParser.java, but examples of accessing other TIFF tags are located nearby in the code. {code:java} final ImageInfo.ColorType colorType = ImageInfo.ColorType.RGB {code} ; > ImageInfo reports wrong color-type for non-RGB TIFF files > ---------------------------------------------------------- > > Key: IMAGING-361 > URL: https://issues.apache.org/jira/browse/IMAGING-361 > Project: Commons Imaging > Issue Type: Bug > Components: Format: TIFF > Reporter: Gary Lucas > Priority: Minor > > When TiffImageParser.getImageInfo() creates an ImageInfo object, it has a > hard-wired value for ColorType of RGB. So images with color models such as > CMYK or YCbCr are reported as RGB. It should look at the Photometric > Interpretation tag and assign a value accordingly. > Note that this issue has nothing to do with the kind of BufferedImage that > other methods will produce. A code fix would only affect the values > reported in ImageInfo. > The problem code is currently at line 534 in TiffImageParser.java, but > examples of accessing other TIFF tags are located nearby in the code. > {code:java} > final ImageInfo.ColorType colorType = ImageInfo.ColorType.RGB > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)