I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-05-26 16:28:34-07 by snah
Copy 'datetimeoriginal' to 'gpsdatetime'?
Hi Phil,
almost there, I'd just like to adjust the GPS-time-tags.

I am trying to copy the tag 'datetimeoriginal' into the tag 'gpsdatetime' in the same file using this command:
exiftool -v "-DateTimeOriginal>GPSDateTime" img110504.tif

To command is processed but the gps-datetime is not there.

Reason:
The images were taken of Curling-Sports-Event within the same ice-rink (location).
The GPS-data and the date is the same for all images, only the time changes for each image.

I was hopeing to be able to use the tag 'datetimeoriginal' as it is equal to the tag 'GPSdatetime'.
The tags 'GPSDatestamp' and 'GPSTimestamp' are not populated yet.
Do they depend on each other?
GPSVersionID : 2.2.0.0 GPSLatitudeRef : North GPSLatitude : 46 deg 25' 48.97" GPSLongitudeRef : East GPSLongitude : 9 deg 45' 51.07" GPSAltitudeRef : Above Sea Level GPSAltitude : 1851 m GPSSatellites : 0 GPSMapDatum : WGS-84 Aperture : 11.0 GPSAltitude : 1851 m Above Sea Level GPSLatitude : 46 deg 25' 48.97" N GPSLongitude : 9 deg 45' 51.07" E GPSPosition : 46 deg 25' 48.97" N, 9 deg 45' 51.07" E
(note: the 'aperture' sits right in the middle.)

How can I accomplish to copy the 'datetimeoriginal' into 'gpsdatetime'?

PS: Well, probably nobody would ever notice the time-difference, I mostly very curious about handling time related values.
Thanks, Hans.
Direct Responses: 10832 | Write a response
Posted on 2009-05-26 17:20:54-07 by exiftool in response to 10831
Re: Copy 'datetimeoriginal' to 'gpsdatetime'?
Hi Hans,

You should understand that GPS tags may exist in either EXIF or XMP information, but the format and names of some tags are slightly different. GPSDateTime is an XMP tag. In EXIF, this is equivalent to the two tags GPSDateStamp and GPSTimeStamp. If you write these two tags, exiftool will create a Composite GPSDateTime value when reading. See the GPS, XMP and Composite tag name documentation for details.

- Phil
Direct Responses: 10833 | Write a response
Posted on 2009-05-26 20:22:06-07 by snah in response to 10832
Re: Copy 'datetimeoriginal' to 'gpsdatetime'?
Hi Phil,
ok, I consulted the Composite tag name documentations.
Not so surei f I understand it all. So the tag 'datetimeoriginal' is a composite of the tags 'datecreated' and 'timecreated'.
The thing is that I cannot find a tag 'timecreated' in neither the X3F nor the corresponding TIF file, so I figured out a way to extract the values for 'datecreated' and 'timecreated' from 'datetimeoriginal' like this (same for the X3F):
exiftool -datetimeoriginal img110500.tif -d %H:%M:%S Date/Time Original : 10:51:23 exiftool -datetimeoriginal img110500.tif -d %Y:%m:%d Date/Time Original : 2009:01:11

At least I've got both values seeked for extracted.

I just need to figure out how to populate the two tags 'GPSdatestamp' and 'GPStimestamp' with the values extracted above.
Tried this but that does not really make much sense:
exiftool -v -n -Tagsfromfile img110504.tif "-datetimeoriginal" -d %H:%M:%S -GPSTimestamp -d %Y:%m:% +d -GPSDatestamp img110504.tif

The combination of the two should then result in a Composite GPSdateTime value, right?
For me, this is a hard nut to crack (of course, also because I don't really comprehend it.
I know I am close and hope you give me a good hint.
Hans
Direct Responses: 10834 | Write a response
Posted on 2009-05-27 00:21:41-07 by exiftool in response to 10833
Re: Copy 'datetimeoriginal' to 'gpsdatetime'?
Try this:

exiftool "-gpstimestamp<datetimeoriginal" "-gpsdatestamp<datetimeoriginal" img110504.tif

- Phil
Direct Responses: Write a response