[
https://issues.apache.org/jira/browse/IMAGING-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837837#comment-16837837
]
Bruno P. Kinoshita commented on IMAGING-221:
--------------------------------------------
[~joakimk], I added a unit test to my local commons-imaging, using the latest
code in the master branch. Then copied your java code there. Had to adjust the
import statements (sanselan -> imaging), and find out where were the constants
now (sanselan -> imaging had not only packages, but also some large classes
split into smaller ones).
And it worked, apparently. I mean, the order of the directories, fields,
segments, etc, may differ, but the content is essentially the same, and passing
the validation with the same command you used here.
{code:java}
kinow:~/Downloads$ exiftool -validate -warning -a original.JPG
Validate : OK
kinow:~/Downloads$ exiftool -validate -warning -a mine.JPG
Validate : OK{code}
Will try to send you a diff of what I have, but it was some quick coding just
to reproduce with the latest version. I avoided using sanselan (even if
patched) because I know that many parts of the code changed for
commons-imaging, and we are not updating anything from sanselan now.
Hope that helps!
Bruno
> updateExifMetadataLossless restructures meta data (and problems with Maker
> Notes)
> ---------------------------------------------------------------------------------
>
> Key: IMAGING-221
> URL: https://issues.apache.org/jira/browse/IMAGING-221
> Project: Commons Imaging
> Issue Type: Bug
> Reporter: Joakim Knudsen
> Assignee: Bruno P. Kinoshita
> Priority: Major
> Fix For: 1.0-alpha2
>
> Attachments: original.JPG, original.html, test.JPG, test.html
>
>
> ExifRewriter's *updateExifMetadataLossless* method causes the meta data of
> the JPEG to be completely reordered after writing. This, in itself, might not
> be a big concern, but it's a bit unexpected when the method is named
> "lossless". More worryingly, I also find problems are introduced wrt. the
> Maker Notes tag (odd offset).
> I've produced an example of the problem in the attached JPEG file, using
> ExifTool to validate/analyze the images before and after. The image is taken
> by a Sony Xperia Z5 phone, and the "original.JPG" validates OK. After
> modifying the contents of the UserComments tag (value: "Test") the modified
> image produces a warning:
> Verifying the attached photo using ExifTool gives the following output:
> $ ./exiftool\(-k\).exe -validate -warning -a ../test.JPG
> -- press RETURN --
>
> Validate : 1 Warning (all minor)
> Warning : [minor] Possibly incorrect maker notes
> offsets (fix by -628?)
>
> Using ExifTool's -htmldump option, it is easy to see how the meta data has
> been affected.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)