commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IMAGING-136) Imaging.getImageInfo() fails to read JPEG file
Date Mon, 29 Dec 2014 10:59:14 GMT

     [ https://issues.apache.org/jira/browse/IMAGING-136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benedikt Ritter updated IMAGING-136:
------------------------------------
    Fix Version/s: Patch Needed

> Imaging.getImageInfo() fails to read JPEG file
> ----------------------------------------------
>
>                 Key: IMAGING-136
>                 URL: https://issues.apache.org/jira/browse/IMAGING-136
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: JPEG
>    Affects Versions: 1.0
>            Reporter: Tilman Hausherr
>             Fix For: Patch Needed
>
>         Attachments: 1402522741337.jpg
>
>
> I get this with the attached file:
> {code}
> Exception in thread "main" java.io.IOException: Could not read block (block start: 20274,
block length: 24267, data length: 7789).
> 	at org.apache.commons.imaging.common.bytesource.ByteSourceArray.getBlock(ByteSourceArray.java:47)
> 	at org.apache.commons.imaging.formats.tiff.TiffReader.getTiffRawImageData(TiffReader.java:445)
> 	at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:222)
> 	at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectory(TiffReader.java:120)
> 	at org.apache.commons.imaging.formats.tiff.TiffReader.readDirectories(TiffReader.java:113)
> 	at org.apache.commons.imaging.formats.tiff.TiffReader.read(TiffReader.java:425)
> 	at org.apache.commons.imaging.formats.tiff.TiffReader.readContents(TiffReader.java:417)
> 	at org.apache.commons.imaging.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:123)
> 	at org.apache.commons.imaging.ImageParser.getMetadata(ImageParser.java:220)
> 	at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:355)
> 	at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:312)
> 	at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getImageInfo(JpegImageParser.java:725)
> 	at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:704)
> 	at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:678)
> 	at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:697)
> 	at com.mycompany.apacheimagingtest.App.main(App.java:17)
> {code}
> I don't need any EXIF data, so it would be nice to have a workaround that just gets me
the basic information about the image, i.e. size, bits, and color type (ycck, cmyk).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message