Thread

Posted on Mon Jan 28 19:12:36 2008 by ggking7
Date Shift fails with MakerNotes error
I'm trying to correct the date of an image but I get: $ exiftool -AllDates+=8776 file.jpg Error: [minor] Bad format (65535) for MakerNotes entry 17 - file.jpg 0 image files updated 1 files weren't updated due to errors Can I fix this?
Direct Responses: 6960 | Write a response
Posted on Tue Jan 29 00:52:58 2008 by exiftool in response to 6955
Re: Date Shift fails with MakerNotes error
Makernote errors are not uncommon if you have edited the image with another utility, and most are designated as minor so they can be ignored (downgraded to warnings) with the -m option.

- Phil
Direct Responses: 6964 | 6965 | Write a response
Posted on Tue Jan 29 05:43:34 2008 by ggking7 in response to 6960
Re: Date Shift fails with MakerNotes error
Perfect, thank you.
Write a response
Posted on Tue Jan 29 13:52:39 2008 by mixx in response to 6960
Re: Date Shift fails with MakerNotes error
I have a related problem (or so I believe). I have a database in Thumbsplus that I want to migrate. I managed to put the Capture date from the database into an unused IPTC field (say CREDIT) as a string of the format "2008:01:29" or (for some images) "2008/01/29" for each image. This date is different from the DateTimeOriginal field, and that is my problem for Lightroom (where I am migrating to). I am trying to change all Date fields in the images to the date stored in IPTC:Credit by

exiftool -S -s -Credit a.jpg | tr '/' ':' | exiftool -d "%Y:%m:%d" -AllDates'<=-' a.jpg

Ideally, I'd like to shift the time by +1 hour, too, but I could not figure out how. This does work for a couple of images (say 30% out 10,000) but for the majority I get an error message about minor (?) MakerNotes errors and the image does not change. Sometimes it does not work at the first time, but if I keep trying it is done afterall. I tried to delete the MakerNotes before I apply the above, then it runs through cleanly. But this I really do not want as I'd like to preserve the Makernotes.

Can I jist use the -m option and trust that all will be well (for 10,000) images? Any help appreciated-

Thanxx, Mixx
Direct Responses: 6966 | Write a response
Posted on Tue Jan 29 14:28:42 2008 by exiftool in response to 6965
Re: Date Shift fails with MakerNotes error
When you use -m you run the risk of losing some information, but it is likely that the information was corrupted to begin with. I have added a new FAQ to help with this question.

I suggest looking at some of the images that are giving you errors. Try using exiftool to extract all information (with -a -u -G1) before and after editing with the -m option, then look at the differences to see what information, if any, was lost:

exiftool -a -u -G1 image.jpg > t1 exiftool -m -alldates="2008:01:29 08:00:00" image.jpg exiftool -a -u -G1 image.jpg > t2 diff t1 t2

A couple more comments about what you are doing:

1) Dates set by -alldates should be in the form "YYYY:MM:DD hh:mm:ss". In your example, you leave out the time.

2) The -d option has no effect when writing, so you can remove this from your command.

3) Any image that produces an error when writing will not be written, so applying the same command again should have the same effect. I don't understand what you mean by "f I keep trying it is done afterall" in this context.

4) The date/time shift of +1 hour must be done in a separate step after writing the date/time values.

- Phil
Direct Responses: 6973 | Write a response
Posted on Thu Jan 31 13:57:01 2008 by mixx in response to 6966
Re: Date Shift fails with MakerNotes error
Thanks Phil, there are some changes but I'll take the risk and jump.

I have now written a shell script and after much trouble (running a GNU shell script on Windows) got it working. I realized while doing this that I have two wishes if I may for exiftool.

I think a syntax exiftool -tag1=$tag2 a.jpg would be much more intuitive that exiftool -tag1<$tag2 (which is by the way difficult to find in the option description).

I think it would be terrific if exiftool had built string manipulation functions such as substitute and substring. With those, one could work without shell or perl scripts and with just one command.

Thanxx, Mixx
Direct Responses: 6975 | Write a response
Posted on Thu Jan 31 14:03:38 2008 by exiftool in response to 6973
Re: Date Shift fails with MakerNotes error
Hi Mixx,

Thanks for your comments.

"I think a syntax exiftool -tag1=$tag2 a.jpg would be much more intuitive..."

But then how would you set the value of tag1 to the string "$tag2" rather than the value of tag2?

"I think it would be terrific if exiftool had built string manipulation functions..."

I agree that these would be useful, but I haven't been able to think of a simple way to add them. My goal is to keep the exiftool command-line interface as simple as possible (it is already way too complex!), since it is always possible (and usually fairly simple) to do what you want in Perl and use the ExifTool API instead of the command-line interface.

- Phil
Direct Responses: 6976 | Write a response
Posted on Thu Jan 31 16:25:20 2008 by mixx in response to 6975
Re: Date Shift fails with MakerNotes error
Phil,

I am not an expert but suggestion 1 is just another problem of how to pass arguments to an application and could be solved by quoting rules maybe -tag1="$tag2" would do the value and -tag1="'$tag2'" the string. I do not know if this works, but would not be anything unusual.

About string manipulation: exiftool gets a string as an argument anyway as in
exiftool "-example_date=$datetimeoriginal" a.jpg
(using the "new" syntax :-)). What's wrong with
exiftool "-example_date=substring($datetimeoriginal,1,10)" a.jpg
to assign the first 10 characters of the DateTimeOriginal flag to example_date? And if that should use a different notation one could
exiftool "-example_date=replace(substring($datetimeoriginal,1,10),':','/'))" a.jpg
to get e.g. "2008/01/31" into example_date.

Just a thought, Mixx

Direct Responses: 6977 | Write a response
Posted on Thu Jan 31 16:55:08 2008 by exiftool in response to 6976
Re: Date Shift fails with MakerNotes error
Hi Mixx,

An interesting thought, but I don't think the idea is comatible with the current command line usage, and it could make things more complex for the average user who just wants to a assign a simple value to a tag (ie. "-License=Copyright(2008)" -- how would this be differentiated from invoking the "Copyright" function?).

- Phil
Direct Responses: 6982 | Write a response
Posted on Thu Jan 31 20:22:07 2008 by mixx in response to 6977
Re: Date Shift fails with MakerNotes error
Yup, I see the problem. Back to shell scripts then. -- Thanxx, Mixx
Write a response