ExifTool Forum

ExifTool => Newbies => Topic started by: Constantin on June 06, 2014, 03:50:14 AM

Title: Corrupted CR2 files can be fixed or not in HEX editor?
Post by: Constantin on June 06, 2014, 03:50:14 AM
Hi, anybody who knows about HEX editor, I have a difficult task.

I have several CR2 Canon 5D2 raw corrupted files. Let's take one to discuss.
I open the CR2 file in HEX editor. It is known that every raw file has in it a JPEG preview info (which is the header of the picture) and RAW info. I managed to copy the RAW body of a corrupted picture to a undamaged one. (I am talking about the info from the last FF D8 until the very end which is FF D9) Save as...a new CR2 file and open in Canon software DPP. The result was amazing for me, as is the first time when I try this: in Preview I saw the undamaged picture and in the edit window the damaged one. So this is clear that the wrong info is in the body of the RAW file... The header is fine for every damaged picture, because I can save them as JPEG. But the problem is when I try to edit and actually see all the RAW picture.

My request is that is anybody here on this forum that can follow the sequences and can figure it out what is wrong?

I have a corrupted CR2 file at this link: http://we.tl/oVMfpYn3wm

Many thanks!
Title: Re: Corrupted CR2 files can be fixed or not in HEX editor?
Post by: Phil Harvey on June 06, 2014, 08:43:30 AM
I won't be on a fast internet connection until Monday, but I will take a look at your image then.

- Phil
Title: Re: Corrupted CR2 files can be fixed or not in HEX editor?
Post by: Constantin on June 06, 2014, 03:31:57 PM
Thank you very much Phil! I'll wait for your opinion.
Title: Re: Corrupted CR2 files can be fixed or not in HEX editor?
Post by: Phil Harvey on June 09, 2014, 07:35:52 AM
I see what you are talking about now.  The raw image doesn't display properly, although the file doesn't appear to be otherwised damaged.  The metadata and the B&W JPEG preview image are intact.

It is funny that I can't see anything obviously wrong with the raw data.  It has the proper header and footer, and the structure looks good.  However, the developed image is garbage.

I'm sorry I can't be of much help here.  I don't know what is wrong with the image itself, and whether or not it can be fixed.

- Phil
Title: Re: Corrupted CR2 files can be fixed or not in HEX editor?
Post by: MOL on June 09, 2014, 11:45:41 PM
Constantin,

Quote from: Constantin on June 06, 2014, 03:50:14 AM
...in Preview I saw the undamaged picture and in the edit window the damaged one.

What you see in preview is the embedded JPG image, not the original RAW data. Damaged CR2 files are a very old problem, and most of the time it's a defective card reader, cable or USB port.  Some people even suspect Lightroom to corrupt Canon images.  In my experience there is almost no chance to restore a corrupted CR2 file such as yours.  If you're lucky, you can retrieve the embedded JPG with DCRAW - but that's pretty much it.  Check your hardware!

HTH
-Uwe
Title: Re: Corrupted CR2 files can be fixed or not in HEX editor?
Post by: Constantin on June 10, 2014, 02:33:46 AM
Thank you HTH,

I'll keep in mind your advice and verify twice the connections, the card reader and the hard-drive.

Constantin


Quote from: MOL on June 09, 2014, 11:45:41 PM
Constantin,

Quote from: Constantin on June 06, 2014, 03:50:14 AM
...in Preview I saw the undamaged picture and in the edit window the damaged one.

What you see in preview is the embedded JPG image, not the original RAW data. Damaged CR2 files are a very old problem, and most of the time it's a defective card reader, cable or USB port.  Some people even suspect Lightroom to corrupt Canon images.  In my experience there is almost no chance to restore a corrupted CR2 file such as yours.  If you're lucky, you can retrieve the embedded JPG with DCRAW - but that's pretty much it.  Check your hardware!

HTH
-Uwe
Title: Re: Corrupted CR2 files can be fixed or not in HEX editor?
Post by: MOL on June 10, 2014, 10:45:08 PM
Quote from: Constantin on June 10, 2014, 02:33:46 AM
Thank you HTH,

HTH means "Hope that helps"... :)

-Uwe
Title: Re: Corrupted CR2 files can be fixed or not in HEX editor?
Post by: Constantin on June 11, 2014, 03:11:52 AM
Ups! Sorry, I didn't think of that...

Thanks Uwe!

Quote from: MOL on June 10, 2014, 10:45:08 PM
Quote from: Constantin on June 10, 2014, 02:33:46 AM
Thank you HTH,

HTH means "Hope that helps"... :)

-Uwe