Skip Menu |

This queue is for tickets about the Image-ExifTool CPAN distribution.

Report information
The Basics
Id: 110559
Status: rejected
Priority: 0/
Queue: Image-ExifTool

People
Owner: Nobody in particular
Requestors: andycham [...] amazon.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Unable to remove certain GPS Time/date tags with exiftool
Date: Wed, 23 Dec 2015 13:33:41 +0000
To: "bug-Image-ExifTool [...] rt.cpan.org" <bug-Image-ExifTool [...] rt.cpan.org>
From: "Champ, Andy" <andycham [...] amazon.co.uk>
There are three tags relating to time and date: Exiftool parameter name meaning XMP #7 -GPSTimeStamp Timestamp of the GPS fix in 3 rational values XMP#1D -GPSDateStamp Date of the GPS fix in ASCII exif:GPSTimeStamp -GPSDateTime Time and date of the GPS fix in ASCII I find that: - Setting either GPSTimeStamp or GPSDateStamp to an empty value also removes GPSDateTime - Setting GpsDateTime to an empty value has no effect It's as if the code is regenerating the GPSDateTime tag if it has both a valid time and a date, rather than storing it as a separate value. Tested on V10.0
I think you are confused by the two GPSDateTIme tags. There is an XMP:GPSDateTime which may be read/written directly, and a Composite:GPSDateTime which is read only and derives its value from EXIF:GPSDateStamp and EXIF:GPSTimeStamp. Use the -G option when reading to see which GPSDateTime you are seeing. To change Composite:GPSDateTime, you need to write the EXIF tags. - Phil
Subject: RE: [rt.cpan.org #110559] Unable to remove certain GPS Time/date tags with exiftool
Date: Wed, 23 Dec 2015 15:47:15 +0000
To: "bug-Image-ExifTool [...] rt.cpan.org" <bug-Image-ExifTool [...] rt.cpan.org>
From: "Champ, Andy" <andycham [...] amazon.co.uk>
I don't think I'm confused - but I might be ;) in fact this whole area is pretty confusing. In CIPA DC-010 -2012 Exif 2.3 metadata for XMP there's a table showing the mapping between tag based and XML properties. That lists the tags 7 and 1d, and states that they both map down to the XML property exif:GPSTimeStamp. AIUI both the tag based and the XML based properties can be written into the file, and they have independent values. It wouldn't make much sense for them to be different - but what I'm trying to do is test my enhancements to support these particular tags in GStreamer. GStreamer has separate code to handle the two types of tag; I have to enhance the readers and writers for both types, and obviously to test this I want files with differing values. Start with a file with no GPS tags (you'll have to mangle the commands if you aren't Linux) rm -f foo.jpg;../../Image-ExifTool-10.00/exiftool ~/Pictures/100_0889.JPG -GPSDateTime="2015:12:25 01:23:45" -o foo.jpg && ../../Image-ExifTool-10.00/exiftool -args foo.jpg | grep GPS gives -GPSDateTime=2015:12:25 01:23:45 rm -f foo.jpg;../../Image-ExifTool-10.00/exiftool ~/Pictures/100_0889.JPG -GPSDateTime="2015:12:25 12:34:56:78" -GPSTimeStamp=01:23:45.67 -o foo.jpg && ../../Image-ExifTool-10.00/exiftool -args foo.jpg | grep GPS gives -GPSVersionID=2.3.0.0 -GPSTimeStamp=01:23:45.67 -GPSDateTime=2015:12:25 12:34:56 Note that there are two DIFFERENT times...
Add -g to your command when extracting metadata with the -args option. You will see that you wrote XMP:GPSDateTime and EXIF:GPSTimeStamp. I think what you want to write is EXIF:GPSDateStamp and EXIF:GPSTimeStamp: -EXIF:GPSDateStamp=2015:12:25 -EXIF:GPSTimeStamp=01:23:45.67
Subject: RE: [rt.cpan.org #110559] Unable to remove certain GPS Time/date tags with exiftool
Date: Wed, 23 Dec 2015 16:35:13 +0000
To: "bug-Image-ExifTool [...] rt.cpan.org" <bug-Image-ExifTool [...] rt.cpan.org>
From: "Champ, Andy" <andycham [...] amazon.co.uk>
The whole reason I raised this is that when _removing_ tags I get strange behaviour. AIUI the three tags are XMP:GPSDateTime controlled by -GPSDateTime EXIF:GPSTimeStamp controlled by -GPSTimeStamp EXIF:GPSDateStamp controlled by - GPSDateStamp That's sort of true. But not completely. I guess it makes sense to have some sort of interaction - most people would want the data stored in the same manner to tie up. (I happen to be someone who doesn't). If you empty either GPSDateStamp or GPSTimeStamp on a file that already has the full set then GPSDateTime is also removed. If you have a file that doesn't already have any of them you can set them to different values. If you have a file with the full set of data then you can't set them to different values.
You're still missing the point. On Wed Dec 23 11:35:44 2015, andycham@amazon.co.uk wrote: Show quoted text
> If you empty either GPSDateStamp or GPSTimeStamp on a file that > already has the full set then GPSDateTime is also removed.
No. Only the tags you deleted are removed. The Composite:GPSDateTime tag is not a physical tag -- its value is derived from GPSDateStamp and GPSTimeStamp.
Subject: RE: [rt.cpan.org #110559] Unable to remove certain GPS Time/date tags with exiftool
Date: Wed, 23 Dec 2015 17:02:06 +0000
To: "bug-Image-ExifTool [...] rt.cpan.org" <bug-Image-ExifTool [...] rt.cpan.org>
From: "Champ, Andy" <andycham [...] amazon.co.uk>
No, there are three physical locations in the file involved in GPS time/date data. This is shown by my previous example: Take a file with no GPS tags, and set -GPSTimeStamp and -GPSDateTime to DIFFERENT times, then look at the output. You'll see two different times, clearly demonstrating that the file contains two different time values.
Yes, I know. We're talking around in circles. In my first response I explained all this. So I don't understand the problem. ExifTool just writes what you tell it. You may choose to write conflicting values if you want. - Phil
Subject: Re: [rt.cpan.org #110559] Unable to remove certain GPS Time/date tags with exiftool
Date: Tue, 29 Dec 2015 10:23:55 +0000
To: Phil Harvey via RT <bug-Image-ExifTool [...] rt.cpan.org>
From: "Champ, Andy" <andycham [...] amazon.co.uk>
I agree, we're talking around in circles. Let me show you exactly what I am seeing. It looks to me as if the code is attempting some sort of merge between the XMP tags and the EXIF XML tags I mentioned in my original post. First, here is a file that was written by a Samsung camera phone with GPS tags contains both values. I'm running on LInux, and I can use grep to show just the tags I am interested in: exiftool -args ~/Pictures/20151209_104853\ GPS\ tagged.jpg | grep -i GPS | egrep -i "time|date" -GPSTimeStamp=10:48:20 -GPSDateStamp=2015:12:09 -GPSDateTime=2015:12:09 10:48:20Z Not surprisingly the two tag types contain the same time and date, albeit in slightly different formats. With a file that contains no GPS tags at all: exiftool -args ~/Pictures/100_0889.JPG | grep -i GPS | egrep -i "time|date" (nothing gets through the grep patterns) Attempt to add mismatched tags to that file: exiftool ~/Pictures/100_0889.JPG -GPSTimeStamp=10:48:20 -GPSDateStamp=2015:12:09 -GPSDateTime="2011:11:11 11:11:11" -o foo.jpg 1 image files created exiftool -args foo.jpg | grep -i GPS | egrep -i "time|date" -GPSTimeStamp=10:48:20 -GPSDateStamp=2015:12:09 -GPSDateTime=2015:12:09 10:48:20Z Notice that although I have set the GPSDateTime field to contain lots of 1s the value read back is the value set to the XMP tags, a couple of weeks ago. If, on the other hand, I set one but not both of the XMP tags then it can contain a different value to the EXIF tag rm foo.jpg exiftool ~/Pictures/100_0889.JPG -GPSTimeStamp=10:48:20 -GPSDateTime="2011:11:11 11:11:11" -o foo.jpg 1 image files created Image-ExifTool-10.00/exiftool -args foo.jpg | grep -i GPS | egrep -i "time|date" -GPSTimeStamp=10:48:20 -GPSDateTime=2011:11:11 11:11:11 rm foo.jpg exiftool ~/Pictures/100_0889.JPG -GPSDateStamp=2015:12:09 -GPSDateTime="2011:11:11 11:11:11" -o foo.jpg 1 image files created exiftool -args foo.jpg | grep -i GPS | egrep -i "time|date" -GPSDateStamp=2015:12:09 -GPSDateTime=2011:11:11 11:11:11 Further, if I take an input file that has both tags (I'll add them through your tool) exiftool ~/Pictures/100_0889.JPG -GPSTimeStamp=10:48:20 -GPSDateStamp=2015:12:09 -GPSDateTime="2011:11:11 11:11:11" -o tagged.jpg 1 image files created exiftool -args tagged.jpg | grep -i GPS | egrep -i "time|date" -GPSTimeStamp=10:48:20 -GPSDateStamp=2015:12:09 -GPSDateTime=2015:12:09 10:48:20Z And then attempt to remove just the GPSTimeStamp XMP tag by setting it to an empty value the GPSDateTime is also removed rm foo.jpg exiftool tagged.jpg -GPSTimeStamp= -o foo.jpg 1 image files created exiftool -args foo.jpg | grep -i GPS | egrep -i "time|date" -GPSDateStamp=2015:12:09 -GPSDateTime=2011:11:11 11:11:11 err... WTH? That wasn't what I expected. Suddenly the GPSDateTime EXIF tag has become visible, set to the value I set it to - and it's not showing the value it was showing in the input file. It does the same thing on setting GPSDateStamp to an empty value. Opening the file tagged.jpg with an editor shows it contains the text <exif:GPSTimeStamp>2011-11-11T11:11:11</exif:GPSTimeStamp> and also it contains the GPSDateStamp value elsewhere. (This is less obvious with these values, as there are lots of 2015:12:09 in there, so I had to set a different date. GSTimeStamp is hidden from a text editor as it is written in binary.) So in this case it's the DISPLAY that's not working, not the setting of the tags - it's reporting a GPSTimeStamp value for the file which is not the same as the one in the XML metadata for that tag. Perhaps I've reported the wrong bug. Could you please attempt to reproduce this on your system? If you don't get the same results that would be very interesting. But wait until after Christmas ;) you shouldn't have been working on the 25th! Happy New Year!
OK. You're getting fooled now because you are not seeing the duplicate tags. This is FAQ number 3: http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q3 Add "-a -G1" to your command when extracting the tags to see what you are missing. - Phil
Subject: RE: [rt.cpan.org #110559] Unable to remove certain GPS Time/date tags with exiftool
Date: Mon, 4 Jan 2016 10:30:04 +0000
To: "bug-Image-ExifTool [...] rt.cpan.org" <bug-Image-ExifTool [...] rt.cpan.org>
From: "Champ, Andy" <andycham [...] amazon.co.uk>
Now I understand what's going on, with the help of the -a -G1 options. Without the -a -G1 options being given: A file with the XMP-exif tag alone shows the composite tag, manufactured from the tag. A file with both the XMP tags 7 and 1d shows them separately, and shows the composite tag manufactured from the two tags. A file with all three tags shows _exactly_ _the_ _same_ output_ as a file that has only the XMP tags 7 and 1d - it shows their values separately, and manufactures a composite tag from them. I feel that this behaviour - silently overriding the value in the XMP-exif tag - is misleading. It certainly confused me. I had assumed that the three values shown in the output were related to the three values stored in the file - and this is not the case. Happy New Year!