strange error reading a JPG

48 views
Skip to first unread message

romanca...@gmail.com

unread,
May 27, 2017, 9:23:07 PM5/27/17
to CodenameOne Discussions
Hi shai! do you know why i get this error? when i open the image with another program , everything is ok


javax.imageio.IIOException: Bogus DQT index 9
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:609)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImageReader.java:347)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReader.java:481)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:602)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1059)
    at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1039)
    at javax.imageio.ImageIO.read(ImageIO.java:1448)
    at javax.imageio.ImageIO.read(ImageIO.java:1352)
Rendering frame took too long 633 milliseconds
    at com.codename1.impl.javase.JavaSEPort.createImage(JavaSEPort.java:3945)
    at com.codename1.ui.Image.createImage(Image.java:556)


If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device

Shai Almog

unread,
May 28, 2017, 12:07:46 AM5/28/17
to CodenameOne Discussions, romanca...@gmail.com
Hi,
googling this it seems the JDK is more strict than most JPEG parsers: https://www.google.com/search?q=IOException%3A+Bogus+DQT

I don't see a workaround but even if there was I'm not sure if we'd want it. If the image is problematic on the simulator it might fail in odd ways on the device too.
Reply all
Reply to author
Forward
0 new messages