Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8154058

[TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way

    XMLWordPrintable

Details

    Description

      Please run the attached test code. The output will be:
      ignore = true:
      EXIF: false
      Fax : false
      GPS : true

      ignore = false:
      EXIF: true
      Fax : true
      GPS : true

      (JDK9 b112, Windows 7).

      The expected output is the 1st one ("EXIF" is non-default param; "Fax" is default param, but it was excluded explicitly; GPS is non-default param, but it was allowed explicitly).

      In the 2nd case (ignoreMetadata is set to default "false" value) the TIFFImageReadParam does not have effect. Is it what expected or a bug? If not an issue, then it should be described in the docs somehow.

      For now the documentation says (ImageReader):
      "The ignoreMetadata parameter, if set to true, allows the reader to disregard any metadata encountered during the read. Subsequent calls to the getStreamMetadata and getImageMetadata methods may return null, and an IIOImage returned from readAll may return null from their getMetadata method. Setting this parameter may allow the reader to work more efficiently. The reader may choose to disregard this setting and return metadata normally. "
      - so it seems that for "true" value of ignoreMetadata the user should have "false" for all the "containsTIFFField()" checks.

      No additions in the TIFFImageReader docs.

      Attachments

        Issue Links

          Activity

            People

              bpb Brian Burkhalter
              avstepan Alexander Stepanov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: