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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.2, 6, 6u15, 6u23
    • Fix Version/s: 7
    • Component/s: client-libs
    • Subcomponent:
    • Resolved In Build:
      b10
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp
    • Verification:
      Verified

      Backports

        Description

        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>

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: