Strange bytes in JPEG meta data (Sony Xperia XZ1 Compact)

Started by joakimk, October 20, 2017, 08:11:23 AM

Previous topic - Next topic

Phil Harvey

The odd offsets honestly aren't a deal breaker, but the maker note problem is more serious and would be difficult to fix.  I don't have time to look at the code now, but I'm willing to wager that they aren't even parsing the maker notes to update the embedded offsets.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

joakimk

Thanks so much. I've opted to make the Exif editing an optional feature of the app, until this issue is sorted out. As far as I know, this is the best (only?) library for editing exif and IPTC in Java.

If you ever have the time and interest, please have look at the example code from the Apache Sanselan docs. It's only a short method, but maybe it will reveal something.

Perhaps one day there'll be a Java port of Exiftool? ;-)

joakimk

So, after writing that, I did a quick Google search, and learned that there are indeed java ports/apis of Exiftool! Never occurred to me until now! Are these projects alive, any one you might recommend?

My exif needs are really quite basic: I need to be able to (overwrite) metadata in JPEGs, preferably not creating a copy of the image file.

Phil Harvey

I looked at the sample code.  The problems are at a lower level than this.

Yes, there are Java wrappers for ExifTool.  But I don't have any experience using these.

ExifTool always creates a copy of the file, but you can use the -overwrite_original option to replace the original file with the edited version.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).