From: Andrea A. <aa...@op...> - 2007-03-19 19:21:57
|
When trying to read images using gt2-image with jai and jai image i/o in the path, but no native libs around, I get the following: Caused by: java.lang.RuntimeException: javax.imageio.IIOException: I/O error reading PNG header! at com.sun.media.jai.imageioimpl.ImageReadCRIF.create(ImageReadCRIF.java:317) ... 50 more Caused by: javax.imageio.IIOException: I/O error reading PNG header! at com.sun.imageio.plugins.png.PNGImageReader.readHeader(PNGImageReader.java:296) at com.sun.imageio.plugins.png.PNGImageReader.getImageTypes(PNGImageReader.java:1402) at javax.imageio.ImageReader.getRawImageType(ImageReader.java:665) at com.sun.media.jai.imageioimpl.ImageReadOpImage.layoutHelper(ImageReadOpImage.java:228) at com.sun.media.jai.imageioimpl.ImageReadOpImage.<init>(ImageReadOpImage.java:473) at com.sun.media.jai.imageioimpl.ImageReadCRIF.create(ImageReadCRIF.java:309) ... 50 more Caused by: javax.imageio.IIOException: Bad length for IHDR chunk! at com.sun.imageio.plugins.png.PNGImageReader.readHeader(PNGImageReader.java:232) ... 55 more This happens with quite a few png's I've tried generating with different programs (gdal, microsoft paint, ...). When the native libs are not available, maybe it's better to fall back on the j2se png reader? Cheers Andrea |