commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IMAGING-205) Imaging (Apache Sanselan) produces "odd offsets" in (EXIF) metadata
Date Tue, 05 Dec 2017 08:42:00 GMT

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

Bruno P. Kinoshita edited comment on IMAGING-205 at 12/5/17 8:41 AM:
---------------------------------------------------------------------

Updating the check list.

{noformat}
[ X ] have a confirmation that the odd bytes is gone and the metadata and image are still
valid/good/correct/etc
    * Thanks for testing Joakim!
[ X ] have a better understand of the different between a TIFFOutputItem and TIFFOutputField.
The latter has a method, writeField, that seems to be correctly handling offsets oddness.
    * Will attach a screen shot of my notes. But basically, TiffOutputField uses TifOutputItem.
The item contains the offset, length, value (another item), etc. And the output field has
the bytes, field type, tag, count, etc. The field is properly writing TIFF data with the correct
number of bytes. The item just holds that data, and its write method writes the bytes as is.
[ ] write a unit test
    * Pending now. Just need to craft the example files for pass/fail tests.
[ X ] find the parts of the specification that define that behaviour, and add links to them
here, in the unit test, and in the javadoc of the class where the fix is applied
    * The library of the US congress holds some interesting archival information https://www.loc.gov/preservation/digital/formats/fdd/fdd000022.shtml,
with links to many documents. I'm using this file https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf.
In the IFD and following sections it is possible to find text supporting the issue here. Page
21 for instance: "providing the offset was an even number greater than or equal to 8"
{noformat}

I'm intending to proceed with the change as is, provided with a unit test. Unless there's
objection here or in the mailing list.



was (Author: kinow):
Updating the check list.

[ X ] have a confirmation that the odd bytes is gone and the metadata and image are still
valid/good/correct/etc
    * Thanks for testing Joakim!
[ X ] have a better understand of the different between a TIFFOutputItem and TIFFOutputField.
The latter has a method, writeField, that seems to be correctly handling offsets oddness.
    * Will attach a screen shot of my notes. But basically, TiffOutputField uses TifOutputItem.
The item contains the offset, length, value (another item), etc. And the output field has
the bytes, field type, tag, count, etc. The field is properly writing TIFF data with the correct
number of bytes. The item just holds that data, and its write method writes the bytes as is.
[ ] write a unit test
    * Pending now. Just need to craft the example files for pass/fail tests.
[ X ] find the parts of the specification that define that behaviour, and add links to them
here, in the unit test, and in the javadoc of the class where the fix is applied
    * The library of the US congress holds some interesting archival information https://www.loc.gov/preservation/digital/formats/fdd/fdd000022.shtml,
with links to many documents. I'm using this file https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf.
In the IFD and following sections it is possible to find text supporting the issue here. Page
21 for instance: "providing the offset was an even number greater than or equal to 8"

I'm intending to proceed with the change as is, provided with a unit test. Unless there's
objection here or in the mailing list.


> Imaging (Apache Sanselan) produces "odd offsets" in (EXIF) metadata
> -------------------------------------------------------------------
>
>                 Key: IMAGING-205
>                 URL: https://issues.apache.org/jira/browse/IMAGING-205
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: imaging.*
>            Reporter: Joakim Knudsen
>            Assignee: Bruno P. Kinoshita
>            Priority: Critical
>         Attachments: 20171030_214812.jpg, 20171030_214812_copy_desktop.JPG, 20171030_21481_COPY.jpg,
DSC_3338.JPG, DSC_3338_imaging_205.JPG, DSC_3338_imaging_205_UC.JPG, DSC_5506.JPG, DSC_5506_copy_desktop.JPG,
Gaboxjellyfish-changedexifmetadata.jpg, Gaboxjellyfish.jpg, Samsung Note 8 Android.jpg, after.html,
before.html
>
>
> I'm using the "last stable version" of Apache Sanselan 0.97 in an Android project (app).
I have not upgraded to Commons Imaging yet, since the website says there is no stable release
yet. Meanwhile, there are bugs in Sanselan. 
> If I run the [sample code method WriteExifMetadataExample.changeExifMetadata|http://svn.apache.org/repos/asf/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/sampleUsage/WriteExifMetadataExample.java?p=820841]
on an image, which updates the Apterture and GPS tags, the resulting image fails to validate
(through Phil Harvey's [ExifTool software|https://sno.phy.queensu.ca/~phil/exiftool/]):
> {noformat}
> > exiftool.exe -validate -error -warning -a "..\20171030_21481_COPY.jpg"
> Validate                        : 19 Warnings (17 minor)
> Warning                         : [minor] Odd offset for IFD0 tag 0x010f
> Warning                         : [minor] Odd offset for IFD0 tag 0x011a
> Warning                         : [minor] Odd offset for IFD0 tag 0x011b
> Warning                         : [minor] Odd offset for IFD0 tag 0x0131
> Warning                         : [minor] Odd offset for IFD0 tag 0x0132
> Warning                         : [minor] Odd offset for ExifIFD tag 0x829a
> Warning                         : [minor] Odd offset for ExifIFD tag 0x829d
> Warning                         : [minor] Odd offset for ExifIFD tag 0x9003
> Warning                         : [minor] Odd offset for ExifIFD tag 0x9004
> Warning                         : [minor] Odd offset for ExifIFD tag 0x9202
> Warning                         : [minor] Odd offset for ExifIFD tag 0x9205
> Warning                         : [minor] Odd offset for ExifIFD tag 0x920a
> Warning                         : [minor] Odd offset for ExifIFD tag 0x9286
> Warning                         : Non-standard count (1) for GPS tag 0x0001 GPSLatitudeRef
> Warning                         : [minor] Odd offset for GPS tag 0x0002
> Warning                         : Non-standard count (1) for GPS tag 0x0003 GPSLongitudeRef
> Warning                         : [minor] Odd offset for GPS tag 0x0004
> Warning                         : [minor] Odd offset for IFD1 tag 0x011a
> Warning                         : [minor] Odd offset for IFD1 tag 0x011b
> {noformat}
> I need some advice on how to proceed here. Since Sanselan does not appear to do what
it should (even on very basic metadata editing), am I correct to assume that the current version
of Commons Imaging does a better job? :-)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message