MakerNoteCanon (Tag 0x927c) too large!

Started by Archive, May 12, 2010, 08:53:53 AM

Previous topic - Next topic

Archive

[Originally posted by red4 on 2006-03-25 18:53:39-08]

Canon EOS 30D RAW files (.CR2)

exiftool.pl -overwrite_original -b -TagsFromFile IMG_0074.CR2 IMG_0074_THUMB.JPG
Error: APP1 segment too large! (81994 bytes) - IMG_0074_THUMB.JPG

MakerNoteCanon (Tag 0x927c) is 75422 bytes, which is over the maxSegmentLen = 0xfffd;

I can use this tool if I omit this tag (MakerNoteCanon), but then I loose lots of interesting things.

exiftool.pl -overwrite_original -b -TagsFromFile IMG_0074.CR2 --MakerNoteCanon IMG_0074_THUMB.JPG

Archive

[Originally posted by red4 on 2006-03-25 19:21:47-08]

Canon EOS 30D RAW files (.CR2)

Code:
exiftool.pl -overwrite_original -b -TagsFromFile IMG_0074.CR2 IMG_0074_THUMB.JPG
Error: APP1 segment too large! (81994 bytes) - IMG_0074_THUMB.JPG

MakerNoteCanon (Tag 0x927c) is 75422 bytes, which is over the maxSegmentLen = 0xfffd;

I can use this tool if I omit this tag (MakerNoteCanon), but then I loose lots of
interesting things.

exiftool.pl -overwrite_original -b -TagsFromFile IMG_0074.CR2 --MakerNoteCanon IMG_0074_THUMB.JPG

Archive

[Originally posted by exiftool on 2006-03-25 21:21:00-08]

I will need a sample 30D CR2 image so I can see what is taking up all the space.  Then maybe I can come up with a strategy to copy as much information as possible to the JPEG image.  I have a 20D CR2 sample which I thought would be similar, but copying all the tags from this image results in an APP1 segment that is only 17kB.

If you could make a sample available, I should be able to come up with a solution.

Archive

[Originally posted by red4 on 2006-03-25 22:24:46-08]

Thank you for your very fast reply!

This is a superb tool.

I'm looking for a place to host a sample image now...

Archive

[Originally posted by red4 on 2006-03-25 22:28:04-08]

OK, I've uploaded a sample to a free hosting site:

http://www.yourfilelink.com/get.php?fid=58669

Please let me know if it doesn't work, I have no experience of using that site...

Archive

[Originally posted by red4 on 2006-03-25 22:40:03-08]

The two large culprits are:

Tag 0x4002 (22276 bytes)

Tag 0x4005 (49288 bytes)

Archive

[Originally posted by exiftool on 2006-03-26 02:37:11-08]

Thanks for the sample, I downloaded it without any problems.

As it turns out, I should have tested this with a 5D CR2 sample instead of a 20D sample, because the 5D also has these two large tags too.  (I'm surprised no 5D owner has complained about this yet.)

I've scanned through all my sample EOS JPEG images, and tag 0x4002 exists in some of them, but 0x4005 does not.  So I think it is safe to just drop tag 0x4005 when copying all tags to a JPEG image.  This will allow the EXIF information to fit in a JPEG segment.

ExifTool version 6.08, just released from my web site, incorporates this modification.  It should solve the problem you observed.

Thanks for bringing this problem to my attention, and for providing a sample image.

Archive

[Originally posted by red4 on 2006-03-26 14:26:57-08]

Thank you!  It is working perfectly now.

If I wanted to save a little disk space, and also drop tag 0x4002, is this possible with the commandline options?

Archive

[Originally posted by exiftool on 2006-03-26 17:12:06-08]

Great.

Individual maker notes tags may not be dropped via command-line options.  But if you want, you could add a "Drop => 1," line to the appropriate tag definition in Canon.pm.

- Phil

Archive

[Originally posted by red4 on 2006-03-27 19:26:21-08]

Excellent, thanks.

I've added the "Drop => 1", and it's working fine.