Can't modify a file with tag EXIF:MakerNotes empty

Started by francois, April 11, 2014, 04:38:35 PM

Previous topic - Next topic

francois

See attached photo and its html dump (straight from Android device). It has tag "ExifIFD-11 MakerNotes" with size 0 (and value 00 00 00 00), and indeed no MakerNotes later on. While the usefulness of this empty tag is debatable, it seems valid according to the Exif spec.

ExifTool will refuse to modify such file:
$ exiftool photo.jpg -GPSAreaInformation=foo -a
        [unrelated warnings snipped]
Error: [minor] Bad MakerNotes offset for Unknown_0x0000 - photo.jpg
    0 image files updated
    1 files weren't updated due to errors


If I clear the MakerNotes tag, then it works:
$ exiftool photo.jpg -EXIF:MakerNotes= -GPSAreaInformation=foo -a
        [unrelated warnings snipped]
    1 image files updated


Phil Harvey

I think you attached the wrong jpg file again.  (unfortunate because downloading the 600kB over a 26 kbaud connection was painful)

But you should be able to write the original if you ignore minor errors with -m

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

francois

Rrrrrr... right, attached a wrong file again, after the running the command line copied in my post. Sorry. (I'm realizing now that attachments on this forum are uploaded when hitting the Post button, not right after selecting the file.) Correct file attached now.

I'm able indeed to write the file with -m, but is it really an error at all?

Phil Harvey

You're right.  The error is unnecessary.  I will fix this.  Thanks for pointing this out.

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

francois

Thanks for fixing. With 9.57, -m is no more needed.

However, it's still a minor warning:
Warning: [minor] Maker notes could not be parsed - a.jpg
If EXIF:MakerNotes tag explicitly says MakerNotes length is 0, then ExifTool shouldn't even complain it can't parse them, since they are none. Maybe you can still improve.

Phil Harvey

Hmmm.  But ExifTool can't parse the maker notes if they are length 0.  So this warning is accurate. :)

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