Fixing maker notes offset - permanently

Started by Archive, May 12, 2010, 08:53:58 AM

Previous topic - Next topic

Archive

[Originally posted by dan83 on 2006-12-03 10:59:59-08]

Hi,

I have some images with incorrect makernotes offsets (created by modifying the image in iPhoto, sigh) and want to fix the offset ... but I can't figure out how to get exiftool to fix the offset permanently.

> exiftool -TAG test.jpg

Warning: [minor] Possibly incorrect maker notes offsets (fix by -216?) - test.jpg

> exiftool -F -comment=test test.jpg

    1 image files updated

> exiftool -TAG test.jpg

Warning: [minor] Possibly incorrect maker notes offsets (fix by -216?) - test.jpg

Looking at the output of "exiftool -htmldump test.jpg > out.html" and "exiftool -F -htmldump test.jpg > out2.html" I see that exiftool is able to actually adjust the problems, without loss of data (at least for me).

Is there some way to get exiftool to rewrite the jpg file with the offsets fixed?

Thanks,

Dan

Archive

[Originally posted by exiftool on 2006-12-03 14:16:32-08]

Hi Dan,

I've given a fair bit of thought to this problem.  I had originally wanted
the -F option to repair the offsets when writing, but have decided that
I can't do this because there are cases were the offsets can look wrong
even though they aren't, and I don't want mess things up for this case.

So I may have to add a separate option to do what you want.  This has
been on my list of things to do, but I will move it to the top now that
you have requested this feature.  Give me a couple of days to work on
this.

- Phil

Archive

[Originally posted by dan83 on 2006-12-03 18:10:57-08]

Great, thanks.

Dan

Archive

[Originally posted by exiftool on 2006-12-04 15:10:35-08]

Hi Dan,

I have a solution, and I was able to do it without adding a new option.
I have made a change so the makenotes offsets are repaired when the
makernotes are copied from another file.  So now you can permanently fix
the offsets by using the -tagsFromFile option to copy the makernotes into
itself.  (I concede that this is not all that intuitive from a user-interface
perspective, but really like to avoid adding new options if possible.)

Here is an example terminal session to illustrate this new feature:

Code:
[10:06 phil:~/source/exiftool_cvs]% ./exiftool a.jpg -filename -warning -a -S
FileName: a.jpg
Warning: [minor] Possibly incorrect maker notes offsets (fix by -275?)
Warning: Invalid CanonCameraSettings data
Warning: Invalid CanonShotInfo data
Warning: Invalid CanonPictureInfo data
[10:06 phil:~/source/exiftool_cvs]% ./exiftool a.jpg -tagsfromfile @ -makernotes -F
Warning: [minor] Adjusted MakerNotes base by -275 - a.jpg
    1 image files updated
[10:06 phil:~/source/exiftool_cvs]% ./exiftool a.jpg -filename -warning -a -S
FileName: a.jpg
[10:06 phil:~/source/exiftool_cvs]%

Don't forget the "-F" option.  The makernotes offsets are only repaired if -F is specified.

I have released version 6.61 with this update, available now from
the ExifTool home page.

Let me know if you have any problems with this.

- Phil

Archive

[Originally posted by dan83 on 2006-12-04 21:57:02-08]

Hehe, yes, this is indeed something one would not think of by themself. I installed 6.61 and it seems to work fine. Thanks for your swift help on this!

Archive

[Originally posted by exiftool on 2006-12-05 13:42:52-08]

Any time.

It may turn out that this feature eventually finds its way into the
normal code path (ie. just -F when writing), but it will take some
time to gain experience using this in the wide variety of situations
that can occur before making such a move.  However, this is a
good first step, so I thank you for prompting me to take it.

- Phil