News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Corrupted CR2 files can be fixed or not in HEX editor?

Started by Constantin, June 06, 2014, 03:50:14 AM

Previous topic - Next topic

Constantin

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!

Phil Harvey

I won't be on a fast internet connection until Monday, but I will take a look at your image then.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Constantin

Thank you very much Phil! I'll wait for your opinion.

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

MOL

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

Constantin

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


Constantin