-
Bug
-
Resolution: Won't Fix
-
P4
-
1.4.0, 5.0, 6, 6u38, 7, 9, 10, 11
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2197063 | 7 | Andrew Brygin | P4 | Closed | Won't Fix | |
JDK-2201679 | 6 | Unassigned | P4 | Closed | Won't Fix |
I am creating a buffered image through ImageIO by reading a jpeg image. I am creating an array list and adding this image to it. I am writing this image as well as the thumbnail list (same image is written as image as well as thumbnail) to a file. Writing process is successful. But when I read the image from this file through ImageIO.read(), I am getting an IIOException: Bogus marker length. This happens only when I use the same image as primary image as well as thumbnail image.
This is noticed right from JDK1.4 on all platforms.
I have attached the test and the image. Execute the test. If you get the following exception on the console, the bug is reproduced.
javax.imageio.IIOException: Bogus marker length
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:554)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImageReader.java:309)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReader.java:431)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:547)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:880)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:864)
at javax.imageio.ImageIO.read(ImageIO.java:1384)
at javax.imageio.ImageIO.read(ImageIO.java:1270)
at JPGReaderReadAllTest.<init>(JPGReaderReadAllTest.java:34)
at JPGReaderReadAllTest.main(JPGReaderReadAllTest.java:50)
This is noticed right from JDK1.4 on all platforms.
I have attached the test and the image. Execute the test. If you get the following exception on the console, the bug is reproduced.
javax.imageio.IIOException: Bogus marker length
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:554)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImageReader.java:309)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReader.java:431)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:547)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:880)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:864)
at javax.imageio.ImageIO.read(ImageIO.java:1384)
at javax.imageio.ImageIO.read(ImageIO.java:1270)
at JPGReaderReadAllTest.<init>(JPGReaderReadAllTest.java:34)
at JPGReaderReadAllTest.main(JPGReaderReadAllTest.java:50)
- backported by
-
JDK-2197063 JPG Reader fails to read the image if thumbnails are present in the input source
-
- Closed
-
-
JDK-2201679 JPG Reader fails to read the image if thumbnails are present in the input source
-
- Closed
-