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

GIF Reader throws IIOException when reading a Indexed GIF image with an embedded color profile

XMLWordPrintable

    • b10
    • generic, x86
    • generic, windows_xp
    • Verified

        I am reading the attached image using ImageIO's GIF Reader and GIF Reader is throwing the following exception -

        Exception in thread "main" javax.imageio.IIOException: Unexpected block type 0!
        at com.sun.imageio.plugins.gif.GIFImageReader.readMetadata(GIFImageReader.java:722)
        at com.sun.imageio.plugins.gif.GIFImageReader.read(GIFImageReader.java:794)
        at javax.imageio.ImageReader.readAll(ImageReader.java:1050)
        at MetadataViewer.main(MetadataViewer.java:82)

        The attached image is a GIF image having an embedded color profile. This is reproducible on JDK6/7 on all platforms. Toolkit API is able to read the image properly.

        Run the attached tests as follows -
        java KannanImageIOTest <img>
        java MetadataViewer <img>

              bae Andrew Brygin
              pmohansunw Praveen Mohan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: