Reading GIF using Java throws javax.imageio.IIOException: Unexpected block type 0!
Last updated on NOVEMBER 05, 2016
Applies to:Java Platform, Standard Edition - Version 1.4.2 to 6 [Release 1.4 to 6]
Information in this document applies to any platform.
Icons for your Java application are not displayed and you get one or more exceptions from the GIFImageReader. Behavior depends on the app. In the worst case, your app won't even start.
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)
You have deployed a new release with new images.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms