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

[TIFF] IIOException: "Insufficient data offsets or byte counts" when loading test image

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:

      Backports

        Description

        To reproduce please use the attached image and the code from JDK-8154075.

        The result will be (JDK9 b113, Win. 7):

        Exception in thread "main" javax.imageio.IIOException: Insufficient data offsets or byte counts
                at com.sun.imageio.plugins.tiff.TIFFIFD.checkFieldOffsets(java.desktop@9-ea/TIFFIFD.java:421)
                at com.sun.imageio.plugins.tiff.TIFFIFD.initialize(java.desktop@9-ea/TIFFIFD.java:647)
                at com.sun.imageio.plugins.tiff.TIFFImageMetadata.initializeFromStream(java.desktop@9-ea/TIFFImageMetadata.java:87)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.readMetadata(java.desktop@9-ea/TIFFImageReader.java:306)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.seekToImage(java.desktop@9-ea/TIFFImageReader.java:280)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.prepareRead(java.desktop@9-ea/TIFFImageReader.java:921)
                at com.sun.imageio.plugins.tiff.TIFFImageReader.read(java.desktop@9-ea/TIFFImageReader.java:1096)
                at javax.imageio.ImageReader.readAll(java.desktop@9-ea/ImageReader.java:1065)
                at LoadImage.load(LoadImage.java:40)
                at LoadImage.main(LoadImage.java:63)

        Can open the image without issues using the following viewers:
        - Windows Photo Viewer (Win. 7)
        - GNOME image viewer 3.10 (Ubuntu 14.04)
        - Preview 8.0 (OS X 10.10)

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: