Posted on 2005-10-26 21:52:01-07 by tschnebeck
Loose magic bytes when writing a CR2 file
Hi,

Canon RAW file format CR2 is TIFF compatible but uses some extra bytes so that you can differ TIFF and CR2 by MIME magic:
Both start with 'II\x2a\x00' on address 0x0 but CR2 contains also 'CR\0x02' at file address 0x8.
When I use ExifTool for writing a new CR2 meta tag header this 'CR\0x02' get lost and I can not differ these filetypes by MIME magic any longer. Can this be corrected, please?

Bye

Thorsten
Direct Responses: 1239 | Write a response
Posted on 2005-10-26 22:28:41-07 by exiftool in response to 1237
Re: Loose magic bytes when writing a CR2 file
Hi Thorsten,

I tested this out and it works fine for me. Are you using a current version? This problem should have been fixed with version 5.64.

Direct Responses: 1242 | Write a response
Posted on 2005-10-26 22:42:04-07 by tschnebeck in response to 1239
Re: Loose magic bytes when writing a CR2 file
Ohhhh, you are right. It seems that I had changed some files with an old version of ExifTool. I have corrected these files now with a hex editor. I made a test with 5.70 and these files are ok. Sorry, wrong alarm :-)

Bye

Thorsten
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.