Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-99

java.io.IOException: Could not read block

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.97
    • 1.0-alpha1
    • Format: JPEG
    • None

    Description

      We have found that certain images could not be read with imaging, even they usually appear to be fine. This is the stack trace:

      java.io.IOException: Could not read block (block start: 442, block length: 8861, data length: 9301).
      	at org.apache.commons.imaging.common.bytesource.ByteSourceArray.getBlock(ByteSourceArray.java:46)
      	at org.apache.commons.imaging.formats.tiff.TiffReader.getJpegRawImageData(TiffReader.java:491)
      	at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:216)
      	at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:103)
      	at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:272)
      	at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:103)
      	at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectories(TiffReader.java:95)
      	at org.apache.commons.imaging.formats.tiff.TiffReader.read(TiffReader.java:421)
      	at org.apache.commons.imaging.formats.tiff.TiffReader.readContents(TiffReader.java:412)
      	at org.apache.commons.imaging.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:132)
      	at org.apache.commons.imaging.ImageParser.getMetadata(ImageParser.java:203)
      	at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:335)
      	at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:295)
      	at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getImageInfo(JpegImageParser.java:668)
      	at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:683)
      	at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:615)
      

      Further research showed that these images usually are made with a certain type of camera. I have searched flicker and found a image which shows the same problems. (This image does not belong to me, but I guess this should be fine for testing purposes)
      http://www.flickr.com/photos/sara-net/3880941727/sizes/o/

      Attachments

        Activity

          People

            Unassigned Unassigned
            st.h st.h
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: