Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-361

ImageInfo reports wrong color-type for non-RGB TIFF files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Format: TIFF
    • None

    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.

      final ImageInfo.ColorType colorType = ImageInfo.ColorType.RGB
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            gwlucas Gary Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: