PDA

View Full Version : Change EXIF date and time in RAW files


gpocock
1st of November 2006 (Wed), 07:49
Hello

There have been several threads on this topic in the past and the concensus has been that the rather complicated EXIFTOOL is the only way to do it. I have just come across the following web site http://www.idimager.com/index.php and there is a free lite version that seems to be quite happy batch changing EXIF times.

Very useful as we have just put our clocks back in the UK

Best Wishes

Geoffrey Pocock

jfrancho
1st of November 2006 (Wed), 07:59
I use ACR, so it's as simple as editing the .xmp sidecar in a text editor.

Scottes
1st of November 2006 (Wed), 08:23
John, will ACR do batch edits to EXIF?



IDImager looks like it's $59 to be able to do batch changes to EXIF. But I'm not sure - will the free version do it? ExifUtils can do it for free.

As for ExifUtils being complicated, here's an example straight from their manual:
exifedit /a “date-taken=2004:01:01 23:59:59” myphoto.jpg
Seems pretty simple to me - you just have to read the manual. :-)

However, I have to admit that adding/subtracting 1 hour from each photo would require a program to read the time, subtract and hour, then write this new time back. Not for everyone.


But will IDImager subtract an hour in Batch mode? Or will it just set the same time to every image?

jfrancho
1st of November 2006 (Wed), 08:40
Sort of. You'd load a metadata template (the one you created in notepad) in bridge, applying it to a multiple selection. Not real elegant. The issue is, as you pointed out, is simply subtracting an hour from each of the date created tags. It's easy if you know VB or something similar, but not for the casual user. Generally I use the .xmp templates to add contact info, copyright stuff, and I hijack a few fields for my own use. Bruce Fraser's Real World Raw book has most of the details on how to play with the sidecar files. I'm using an action, so the actual steps escape me right now :). It wasn't that hard to figure out. The difficulty is that task requires find and replace, using a regular expression, to edit metadata. I don't think that many of the usual programs can do this.

Scottes
1st of November 2006 (Wed), 09:02
Yeah, I highly doubt that any program would natively "subtract 1 hour" from each photo's EXIF. Many can do it with a little programming. I use iMatch for image catalogging and I'm pretty sure it would be simple in that program, as it's scripting language is rather easy to use.

Myself, I'd probably write a Perl script, which would actually be the easiest way for me.

jfrancho
1st of November 2006 (Wed), 09:15
Oh yeah, Perl! Haven't touched that in years. There's some good regex stuff in there - probaly would take two lines of code, too ;).

Scottes
1st of November 2006 (Wed), 09:21
I'm thinking 7 lines, though the she-bang and "use EXIF" are two.

StewartR
1st of November 2006 (Wed), 10:02
It's very easy indeed with BreezeBrowser. I've used it several times after I've forgotten to change the camera's clock when travelling across time zones. You can specify the increment you want to apply to the date/time in the EXIF data (e.g. +5 hours), and apply it to a whole batch of photos with one operation. It has a relatively straightforward interface so you don't need to worry about command line commands. And best of all, it actually edits the RAW files directly, so you don't have to keep any sidecar files alongside them.

gpocock
1st of November 2006 (Wed), 10:18
John, will ACR do batch edits to EXIF?



IDImager looks like it's $59 to be able to do batch changes to EXIF. But I'm not sure - will the free version do it? ExifUtils can do it for free.

As for ExifUtils being complicated, here's an example straight from their manual:
exifedit /a “date-taken=2004:01:01 23:59:59” myphoto.jpg
Seems pretty simple to me - you just have to read the manual. :-)

However, I have to admit that adding/subtracting 1 hour from each photo would require a program to read the time, subtract and hour, then write this new time back. Not for everyone.


But will IDImager subtract an hour in Batch mode? Or will it just set the same time to every image?

Exifutils says it's shareware, so not free. IDimager Lite is free and will batch change exif. Attached image shows the interface for batch editing a group of dng files

Best Wishes

Geoffrey Pocock

Scottes
1st of November 2006 (Wed), 11:13
Exifutils says it's shareware, so not free. IDimager Lite is free and will batch change exif.
ExifUtils has a free version, too.

But I can see that IDimager can do the time shift, which would be difficult (for most people) in ExifUtils.

tim
29th of April 2007 (Sun), 08:24
Does anyone else have any updates for this? I managed to set the month wrong on one camera, though the time was right, now I need to wind the month back on several hundred 20D/30D RAW images. I use CS3 Bridge beta, jfrancho's suggestion was to change the xmp information, but bridge doesn't seem to pick it up.

Exifutils (free) only does 10 files at a time. The idimager lite website ( http://lite.idimager.com ) is down, though their main site is up. I found another thread that will let me hack things with a perl script through cygwin but I can't be bothered unless I really have to - I might just pay a license fee - but free solutions are best! :)

Scottes
29th of April 2007 (Sun), 08:45
You could pay for ExifUtils. Or the classic way to get around the 10-image limit:

for %x in (*.CR2) do <exifutils command> %x

tim
29th of April 2007 (Sun), 08:50
I lost my credit card today so I can't pay for anything online for a few days :( Can you be a little more specific on the script please Scottes, i've only done a little scripting and i've been awake 20 hours or so.

tim
29th of April 2007 (Sun), 09:15
Looks like windows exe of EXIFtool will do the job, it's just going to have to wait until I get some sleep before I figure out the command line parameters. I just have to subtract one month and one day, should be easy :)

Scottes
29th of April 2007 (Sun), 11:35
That line IS the script. It's a one line DOS script which will run a command ("<exifutils command>" - whatever that command happens to be) on every file in the current directory. Once you figure out the proper command with parameters just replace "<exifutils command>" with the desired command and parameters.

Equivalent to the Unix command:
for x in *.CR2 ; do <exifutils command> $x ; done

tim
29th of April 2007 (Sun), 17:18
Ah ok, thanks :)

E-K
29th of April 2007 (Sun), 22:05
ExifTools has no 10 file limit so no worry on that front. ExifUtils is a different program which is shareware. ExifTools (http://www.sno.phy.queensu.ca/~phil/exiftool/) uses a Perl license and is free.

The command line you're looking for (for ExifTools) should be something like:

exiftool "-AllDates-=:1: 1::"

or

exiftool "-DateTimeOriginal-=:1: 1::"

The format is Y:M: D H:M:S (with zeroes assumed). So -=:1: 1:: will shift back 1 month and 1 hour.

Note this from their documentation though:

"The inconsistency is handled by shifting the first tag found with the actual specified shift, then calculating the equivalent time difference in seconds for this shift and applying this difference to subsequent tags in a batch conversion."

So if you really want to just decrement the month and hour both by 1 then use:

for %i in (*.*) do exiftool "-AllDates-=:1: 1::" %i

If everything is from the same date/time then either will work fine.

e-k

tim
30th of April 2007 (Mon), 01:25
I did it, and it said it worked, but bridge didn't seem to pick up the change. I re-downloaded the files with DIM and had it rename the images based on the time taken (not date) so I can order them ok. Thanks for the help everyone :)