Loose magic bytes when writing a CR2 file

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

Previous topic - Next topic

Archive

[Originally posted by tschnebeck on 2005-10-26 21:52:01-07]

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

Archive

[Originally posted by exiftool on 2005-10-26 22:28:41-07]

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.

Archive

[Originally posted by tschnebeck on 2005-10-26 22:42:04-07]

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