commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Groß (JIRA) <j...@apache.org>
Subject [jira] [Commented] (IMAGING-136) Imaging.getImageInfo() fails to read JPEG file
Date Mon, 09 Mar 2015 21:35:39 GMT

    [ https://issues.apache.org/jira/browse/IMAGING-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353662#comment-14353662
] 

Michael Groß commented on IMAGING-136:
--------------------------------------

1402522741337.jpg has several scans. Commons-imaging reads the last one which has 4 components
(= the color of a pixel is defined by a color model with 4 inks like CMYK).

I propose a patch at
http://github.com/mgmechanics/commons-imaging/tree/IMAGING-136
which assumes the CMYK color model and reads the image 1402522741337.jpg.

> 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