Skip Menu |

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

Report information
The Basics
Id: 86081
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Image-ExifTool

People
Owner: EXIFTOOL [...] cpan.org
Requestors: astricker [...] futurelab.ch
Cc:
AdminCc:

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



Subject: GPS Tags not detected / GPS pointer references previous InteropIFD directory
I've got a image taken by a HTC 7 Pro T7576 / Windows Phone 7.5 device. The file WP_000415.jpg is attached to this bug. The image contains GPS data. The exif data is shown by the users tools (and the exif command line tool from libexif) but not with exiftool (We use Image::ImageInfo::image_info to extract the tags). I see this data here: 'Tag-0x0000' => [ 2, 2, 0, 0 ], 'Tag-0x0004' => bless( [ 9, 1, 22, 1, 46452, 1000 ], Image::TIFF::Rational' ), Clearly ExifTool doesn't understand this tag. There must be a problem, because this warning is also shown: Warning: GPS pointer references previous InteropIFD directory But I don't have an idea what's the cause: * Complete broken camera software writing wrong Exif data * An edge case/bug in ExifTool Regards, Andy
Subject: WP_000415.jpg
Download WP_000415.jpg
image/jpeg 240.1k
WP_000415.jpg
Hi Andy, Thanks for this report. The problem is that the EXIF in this HTC image is written incorrectly. The InteropOffset incorrectly points to the GPS IFD. The question is: How should this problem be handled? ExifTool employs some logic that prevents it from processing the same EXIF IFD twice. This logic protects against problems like infinite recursion. Unfortunately, in this particular case, it just happens that the invalid InteropIFD is processed before the GPS IFD. So ExifTool will not process the (otherwise valid) GPS IFD because it already processed an IFD at the same offset. I think that ExifTool's response to this improperly formatted EXIF is reasonable, and don't think it is worthwhile changing it or adding a patch for this unique situation. The proper course of action would be to submit a bug report to HTC. However, I will entertain any opposing arguments. - Phil
I should mention that you can extract the improperly referenced GPS information from the InteropIFD like this: Show quoted text
> exiftool -u -H -interopifd:all HTC_7ProT7576.jpg
0x0000 Exif 0x0000 : 2 2 0 0 0x0001 Interoperability Index : Unknown (N) 0x0002 Interoperability Version : 47 25 27.624 0x0003 Exif 0x0003 : E 0x0004 Exif 0x0004 : 9 22 46.452 0x0005 Exif 0x0005 : 0 0x0006 Exif 0x0006 : 0 0x000a Exif 0x000a : 2 0x000b Processing Software : 3000 - Phil
From: astricker [...] futurelab.ch
Hi Phil Thanks for the quick response. Show quoted text
> The problem is that the EXIF in this HTC image is written incorrectly.
I thought so, but I'm not really fluently enough in Exif tags to be sure that this is outside the specifications. Specifically because libexif somehow managed to read this mess. Show quoted text
> The InteropOffset incorrectly points to the GPS IFD. > The question is: How should this problem be handled? > > ExifTool employs some logic that prevents it from processing the same > EXIF IFD twice. This logic protects against problems like infinite > recursion.
If I can choose between a stable Exif parser and one that handles one broken vendor specific bug outside the specifications, I'll choose the stable one. It looks like some vendors can't follow the specifications (e.g.: #41355). Show quoted text
> I think that ExifTool's response to this improperly formatted EXIF is > reasonable, and don't think it is worthwhile changing it or adding > a patch for this unique situation. The proper course of action > would be to submit a bug report to HTC.
Acknowledged. Show quoted text
>I should mention that you can extract the improperly referenced > GPS information from the InteropIFD like this: > exiftool -u -H -interopifd:all HTC_7ProT7576.jpg
Thanks for the pointer. I tried with 3c. from FAQ (http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html), but that didn't worked out. But Image::Info::image_info() returns this tags (using the hex ID for the tags), so I'm already able to extract this in this specific case. Thanks for your very useful answer and the great ExifTool. Regards, Andy
On Wed Jun 12 08:57:19 2013, astricker wrote: Show quoted text
> It looks like some vendors can't follow the specifications > (e.g.: #41355).
Interestingly, this was also an HTC. I'd suggest they hire better programmers... ;) - Phil
I have received another report about this, and will be introducing a patch in ExifTool 9.42 which will allow this GPS information to be extracted.