commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SANSELAN-13) Problem loading JPEG metada
Date Tue, 20 Dec 2011 11:05:30 GMT

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

Emmanuel Bourg updated SANSELAN-13:
-----------------------------------

      Description: 
I'm trying to load the metadata from image files generated by a JAI-PULNIX camera, model TS-1327EN.

I am specifically interested in getting the following tag values:

ExifTagConstants.EXIF_TAG_IMAGE_DESCRIPTION,
ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL and
ExifTagConstants.EXIF_TAG_SUB_SEC_TIME_ORIGINAL.

But, when the following line of code is executed:

    {code}IImageMetadata metadata = Sanselan.getMetadata(file);{code}

I get one of two errors:

{code}
java.io.IOException: Invalid Segment: insufficient data
	at org.apache.sanselan.common.BinaryFileFunctions.readByteArray(BinaryFileFunctions.java:497)
	at org.apache.sanselan.formats.jpeg.JpegUtils.traverseJFIF(JpegUtils.java:88)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.readSegments(JpegImageParser.java:175)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.readSegments(JpegImageParser.java:273)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifRawData(JpegImageParser.java:383)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:363)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:314)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:871)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:864)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:839)
	at MetadataExample.metadataExample(MetadataExample.java:21)
{code}

or

{code}
java.io.IOException: Could not read block (block start: 1020, block length: 1447680, data
length: 900).
	at org.apache.sanselan.common.byteSources.ByteSourceArray.getBlock(ByteSourceArray.java:47)
	at org.apache.sanselan.formats.tiff.TiffReader.getTiffRawImageData(TiffReader.java:409)
	at org.apache.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:197)
	at org.apache.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:100)
	at org.apache.sanselan.formats.tiff.TiffReader.readDirectories(TiffReader.java:92)
	at org.apache.sanselan.formats.tiff.TiffReader.read(TiffReader.java:399)
	at org.apache.sanselan.formats.tiff.TiffReader.readContents(TiffReader.java:390)
	at org.apache.sanselan.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:125)
	at org.apache.sanselan.ImageParser.getMetadata(ImageParser.java:76)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:376)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:314)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:871)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:864)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:839)
	at MetadataExample.metadataExample(MetadataExample.java:21)
{code}

Is there something wrong with the encoding of these images?

If that is the case I could contact JAI-PULNIX and ask them to fix it, but I'm not sure what
the problem is.


  was:
I'm trying to load the metadata from image files generated by a JAI-PULNIX camera, model TS-1327EN.

I am specifically interested in getting the following tag values:

ExifTagConstants.EXIF_TAG_IMAGE_DESCRIPTION,
ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL and
ExifTagConstants.EXIF_TAG_SUB_SEC_TIME_ORIGINAL.

But, when the following line of code is executed:

    IImageMetadata metadata = Sanselan.getMetadata(file);

I get one of two errors:

java.io.IOException: Invalid Segment: insufficient data
	at org.apache.sanselan.common.BinaryFileFunctions.readByteArray(BinaryFileFunctions.java:497)
	at org.apache.sanselan.formats.jpeg.JpegUtils.traverseJFIF(JpegUtils.java:88)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.readSegments(JpegImageParser.java:175)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.readSegments(JpegImageParser.java:273)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifRawData(JpegImageParser.java:383)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:363)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:314)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:871)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:864)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:839)
	at MetadataExample.metadataExample(MetadataExample.java:21)

or

java.io.IOException: Could not read block (block start: 1020, block length: 1447680, data
length: 900).
	at org.apache.sanselan.common.byteSources.ByteSourceArray.getBlock(ByteSourceArray.java:47)
	at org.apache.sanselan.formats.tiff.TiffReader.getTiffRawImageData(TiffReader.java:409)
	at org.apache.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:197)
	at org.apache.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:100)
	at org.apache.sanselan.formats.tiff.TiffReader.readDirectories(TiffReader.java:92)
	at org.apache.sanselan.formats.tiff.TiffReader.read(TiffReader.java:399)
	at org.apache.sanselan.formats.tiff.TiffReader.readContents(TiffReader.java:390)
	at org.apache.sanselan.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:125)
	at org.apache.sanselan.ImageParser.getMetadata(ImageParser.java:76)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:376)
	at org.apache.sanselan.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:314)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:871)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:864)
	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:839)
	at MetadataExample.metadataExample(MetadataExample.java:21)

Is there something wrong with the encoding of these images?

If that is the case I could contact JAI-PULNIX and ask them to fix it, but I'm not sure what
the problem is.


    Fix Version/s: 1.0
    
> Problem loading JPEG metada
> ---------------------------
>
>                 Key: SANSELAN-13
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-13
>             Project: Commons Sanselan
>          Issue Type: Question
>            Reporter: Bruno Abreu
>            Priority: Minor
>             Fix For: 1.0
>
>         Attachments: 10200023566.jpg, 10200023936.jpg
>
>
> I'm trying to load the metadata from image files generated by a JAI-PULNIX camera, model
TS-1327EN.
> I am specifically interested in getting the following tag values:
> ExifTagConstants.EXIF_TAG_IMAGE_DESCRIPTION,
> ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL and
> ExifTagConstants.EXIF_TAG_SUB_SEC_TIME_ORIGINAL.
> But, when the following line of code is executed:
>     {code}IImageMetadata metadata = Sanselan.getMetadata(file);{code}
> I get one of two errors:
> {code}
> java.io.IOException: Invalid Segment: insufficient data
> 	at org.apache.sanselan.common.BinaryFileFunctions.readByteArray(BinaryFileFunctions.java:497)
> 	at org.apache.sanselan.formats.jpeg.JpegUtils.traverseJFIF(JpegUtils.java:88)
> 	at org.apache.sanselan.formats.jpeg.JpegImageParser.readSegments(JpegImageParser.java:175)
> 	at org.apache.sanselan.formats.jpeg.JpegImageParser.readSegments(JpegImageParser.java:273)
> 	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifRawData(JpegImageParser.java:383)
> 	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:363)
> 	at org.apache.sanselan.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:314)
> 	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:871)
> 	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:864)
> 	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:839)
> 	at MetadataExample.metadataExample(MetadataExample.java:21)
> {code}
> or
> {code}
> java.io.IOException: Could not read block (block start: 1020, block length: 1447680,
data length: 900).
> 	at org.apache.sanselan.common.byteSources.ByteSourceArray.getBlock(ByteSourceArray.java:47)
> 	at org.apache.sanselan.formats.tiff.TiffReader.getTiffRawImageData(TiffReader.java:409)
> 	at org.apache.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:197)
> 	at org.apache.sanselan.formats.tiff.TiffReader.readDirectory(TiffReader.java:100)
> 	at org.apache.sanselan.formats.tiff.TiffReader.readDirectories(TiffReader.java:92)
> 	at org.apache.sanselan.formats.tiff.TiffReader.read(TiffReader.java:399)
> 	at org.apache.sanselan.formats.tiff.TiffReader.readContents(TiffReader.java:390)
> 	at org.apache.sanselan.formats.tiff.TiffImageParser.getMetadata(TiffImageParser.java:125)
> 	at org.apache.sanselan.ImageParser.getMetadata(ImageParser.java:76)
> 	at org.apache.sanselan.formats.jpeg.JpegImageParser.getExifMetadata(JpegImageParser.java:376)
> 	at org.apache.sanselan.formats.jpeg.JpegImageParser.getMetadata(JpegImageParser.java:314)
> 	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:871)
> 	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:864)
> 	at org.apache.sanselan.Sanselan.getMetadata(Sanselan.java:839)
> 	at MetadataExample.metadataExample(MetadataExample.java:21)
> {code}
> Is there something wrong with the encoding of these images?
> If that is the case I could contact JAI-PULNIX and ask them to fix it, but I'm not sure
what the problem is.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message