Skip Menu |

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

Report information
The Basics
Id: 38911
Status: resolved
Worked: 2.5 hours (150 min)
Priority: 0/
Queue: Image-ExifTool

People
Owner: EXIFTOOL [...] cpan.org
Requestors: es186 [...] fen-net.de
Cc:
AdminCc:

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



Subject: Casio MakerNotes get damaged by exiftool
Date: Tue, 2 Sep 2008 14:49:39 +0200
To: bug-Image-ExifTool [...] rt.cpan.org
From: Ronald <es186 [...] fen-net.de>
Hi! I tried to use exiftool to correct the time of some images and noticed the following problem when trying to correct a wrong correction: $ exiftool -AllDates+='0:0:1 23:58:18' *.jpg 12 image files updated $ exiftool -AllDates-='1:0:0 0:0:0' *.jpg Error: [minor] Bad MakerNotes directory pointer for FirmwareDate - zl_2008_001.jpg Error: [minor] Bad MakerNotes directory pointer for FirmwareDate - zl_2008_002.jpg [...] 0 image files updated 12 files weren't updated due to errors I've tried version 7.30 (from Debian Unstable) and 7.41. Perl: This is perl, v5.10.0 built for i486-linux-gnu-thread-multi OS: Linux defiant 2.6.25.5 #2 PREEMPT Mon Jun 9 18:35:40 CEST 2008 i686 GNU/Linux Below is a diff of the data displayed before/after the first exiftool command to correct the time/date. Thanks for your (nevertheless) great Program! Ronald $exiftool -all -s zl_2008_014.jpg_original >before $exiftool -all -s zl_2008_014.jpg >after $diff -u before after --- before 2008-09-02 14:42:51.000000000 +0200 +++ after 2008-09-02 14:43:47.000000000 +0200 @@ -1,8 +1,8 @@ ExifToolVersion : 7.30 -FileName : zl_2008_014.jpg_original +FileName : zl_2008_014.jpg Directory : . FileSize : 4 MB -FileModifyDate : 2008:08:14 11:41:16 +FileModifyDate : 2008:09:02 14:43:28 FileType : JPEG MIMEType : image/jpeg ExifByteOrder : Big-endian (Motorola, MM) @@ -13,14 +13,14 @@ YResolution : 72 ResolutionUnit : inches Software : 1.00 -ModifyDate : 2008:08:14 11:41:16 +ModifyDate : 2009:08:15 11:39:34 YCbCrPositioning : Centered ExposureTime : 1/10 FNumber : 2.8 ExposureProgram : Program AE ExifVersion : 0221 -DateTimeOriginal : 2008:08:14 11:41:16 -CreateDate : 2008:08:14 11:41:16 +DateTimeOriginal : 2009:08:15 11:39:34 +CreateDate : 2009:08:15 11:39:34 ComponentsConfiguration : YCbCr CompressedBitsPerPixel : 5.005767013 ExposureCompensation : 0 @@ -31,18 +31,17 @@ FocalLength : 7.9 mm PreviewImageSize : 320x240 PreviewImageLength : 19744 -PreviewImageStart : 6364 -FirmwareDate : 2006:02:13 10:42 +PreviewImageStart : 9480 +Warning : Bad MakerNotes directory pointer for FirmwareDate WhiteBalanceBias : 381 376 WhiteBalance : Unknown (17) -AFPointPosition : 50% 50% ObjectDistance : 0.133 m FlashDistance : 0 RecordMode : Program AE SelfTimer : Off Quality : Fine FocusMode : Single-Area Auto Focus -HometownCity : Berlin +HometownCity : 0602 BestShotMode : Off AutoISO : On ISO : 200 @@ -71,7 +70,7 @@ OffsetSchema : 4102 Padding : (Binary data 2060 bytes, use -b option to extract) Compression : JPEG (old-style) -ThumbnailOffset : 26286 +ThumbnailOffset : 6542 ThumbnailLength : 3447 Subject : ZL_2008 LastKeywordXMP : ZL_2008
Download signature.asc
application/pgp-signature 197b

Message body not shown because it is not plain text.

Hi Ronald, Thanks for this bug report. Do you have a copy of the original file that you could email me? (phil at owl.phy.queensu.ca) If not, do you know the Casio camera model? - Phil
Thanks for the sample. The problem is caused because the image has been edited with some other software that adds a padding block of 2060 bytes before the maker notes and fails to properly update the makernotes offsets for this change. When reading this image, exiftool automatically corrects the invalid offsets, but unfortunately when writing it tries to maintain the invalid offsets and runs into trouble because some of the values go negative. I am currently trying to figure out what can be done about this. At the very least, I will put in a check for this error condition when writing.
I have just released exiftool 7.42 which addresses this problem. The behaviour of 7.42 is now: 1) Without options, exiftool gives the following error message when writing a file with this problem: "Error: [minor] MakerNotes offsets may be incorrect (fix or ignore?)" 2) The error may be ignored by writing with the -m option, which is effectively the previous behaviour but you run the chance of further corrupting the makernotes as before. With this, you get the following warning: "Warning: MakerNotes offsets may be incorrect (ignored)" 3) If you write with the -F option, exiftool attempts to fix the problem, and the offsets are corrected with this warning: "Warning: Fixed incorrect MakerNotes offsets" I say "attempts" because there may be other types of corruption which exiftool can not properly repair, but in the case of your images this seems to work fine. Please let me know if you have any further problems. - Phil