Setting 'date created' etc in TIFF and PSD files

Started by dgordon, May 24, 2011, 08:38:32 AM

Previous topic - Next topic

dgordon

Looking for clues and pointers to see if I can read a TIFF file's IPTC date and adjust the EXIF and/or file 'date created' to match.

I'm using Apple's Aperture which appears to see a photo's date as its 'date created' rather than its IPTC date. So I have scanned images which have the correct IPTC date (having been annotated elsewhere) but Aperture says are from a different date. (To confuse things further, although Aperture can 'fix' the date, when it updates the original file it corrupts it! So that's not an option.)

CameraBits' Photo Mechanic can update the 'capture date and time' and that make everything work as expected but I have a number to do and PM isn't very automated.

I think I could write an AppleScript, just need clues as to what metadata I need to change.

Thanks!

Phil Harvey

This can be done with a simple exiftool command.  Something like this:

exiftool '-exif:CreateDate<$iptc:DateCreated $iptc:TimeCreated' FILE

where FILE is the name of one or more image files and/or folders containing images.

- 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 ($).

dgordon

Thanks for the help, I'm progressing!

What I've found is I need to update the XMP dates. I can do that using the IPTC data

exiftool '-xmp:DateCreated<$iptc:DateCreated'

which works well. But I'd also like the time added and as I can't guarantee having an IPTC time to use I want to set all times to 12:00.

I've tried writing "00:00:00+00:00" to -xmp:TimeCreated but I don't seem to be getting anywhere. I think I need photoshop:DateCreated to show in the format 2011-05-26T12:00:00 but I'm still failing!

A clue as to how I could add the time 12:00 to my IPTC date. I can't seem to write to the Photoshop group, it doesn't appear to be XMP-photoshop?

Thanks again!

Phil Harvey

The XMP "date" tags may contain a time as well, so something like this may do what you want:

exiftool '-xmp:Datecreated<$iptc:datecreated 12:00:00Z' ...

(note that I used 'Z' instead of '+00:00' because some older buggy versions of Photoshop won't accept images with a zero time offset)

- 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 ($).

dgordon

Thanks again, I think I've sorted this now. After a few Red Herrings reading the metadata modified by PhotoMechanic I worked out that I needed to modify the EXIF ModifyDate which I (naturally?) assumed was the date the file was modified, not created...

To get Aperture to report the correct date I'm using

exiftool '-exif:ModifyDate<$iptc:DateCreated 12:00:00'

Aperture seems to demand a time and hasn't worried about time zone offsets. I'm also updating the IPTC dates to match the XMP and EXIF as well as removing some redundant XMP-MediaPro metadata. I'm not sure if I care about old buggy Photoshop versions!

Thanks!

David