ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: bisoh on July 02, 2017, 01:41:58 PM

Title: Fixing corrupt cr2
Post by: bisoh on July 02, 2017, 01:41:58 PM
Hello,

I woke up today and found some random old raw (CR2) photos corrupt. Could not open using LR, Canon's software, windows image viewer  etc. No image repair/recovery tool was able to do anything useful. I downloaded the eixfTool and ran it against one corrupt image and one that works and this is what I got:

corrupt file
  FileType = VRD
  FileTypeExtension = VRD
  MIMEType = application/unknown
  Warning = Format error in VRD file


working file
  FileType = CR2
  FileTypeExtension = CR2
  MIMEType = image/x-canon-cr2

I am not sure why are they different. I have read in some threads here that people use hex editors to try and copy the header of one image into the other. I downloaded a hex editor and opened both files but I am not sure what to do. They look different tho.

Corrupt file starts with
"Canon Optional Data"

working file starts with
some gibberish but then I can see my camera model.

I am not sure what can I do to save those images. Can someone please help me :(

I have uploaded my raw file to https://drive.google.com/file/d/0Bw2gcla8ipeOSlVKSkdNX3VndzQ/view?usp=sharing

Thanks
B
Title: Re: Fixing corrupt cr2
Post by: StarGeek on July 02, 2017, 06:41:04 PM
You might want to check to see if the hard drive is starting to fail.  Files shouldn't randomly corrupt so badly that you can't view them.
Title: Re: Fixing corrupt cr2
Post by: bisoh on July 03, 2017, 08:37:44 AM
Thank you for your response.

It is not a H/W failure. I believe what happened is that when I purchased Lightroom while ago,I went back to all my raw files and reset them and saved them using DPP (canon's software). It has mostly happened in 2 folders mainly.
Based on the fact the the new files are recognised as VRD and begin with "Canon optional data" tag and it has no ending, I am assuming that the somewhere along the line as I was resetting the pictures, they got corrupted. Maybe I used a wrong shortcut while selecting/saving/resetting files and I ended up with a messed up CR2..

I am wondering if there is a way to extract the picture information and recreate the CR2 maybe using a working file.
Title: Re: Fixing corrupt cr2
Post by: MOL on July 03, 2017, 05:50:37 PM
That's strange.  VRD files are usually in an XML format and associated with Microsoft Visio.  They have nothing whatsoever to do with an *.CR2 image file.  Have you tried to rename your corrupt files back from *. VRD to *.CR2 ?

-Uwe
Title: Re: Fixing corrupt cr2
Post by: bisoh on July 03, 2017, 07:09:50 PM
They are not named *.VRD they are called *.CR2. But when I used the exiftool it recognized them as VRD files. VRD files are also Canon's recipe file.

i have just gone through some more folders and there are folders where only the edited photos through DPP have been corrupted. The rest are fine.

I am really hoping there is a way to recover the data from the raw files. This is very frustrating.
Title: Re: Fixing corrupt cr2
Post by: MOL on July 04, 2017, 12:06:07 PM
Looks rather hopeless.  The dimensions are reported as 0 x 0 pixel at 72 dpi.  No other meta data in the file.  What have you done to "reset" your images, as you say?

-Uwe
Title: Re: Fixing corrupt cr2
Post by: Phil Harvey on July 05, 2017, 08:55:54 AM
Recovering the raw image may be quite a bit of work if it is possible.

However, there is a high-quality embedded JPEG (5184x3456 pixels) in this file that may be extracted using my extract_preview script (https://exiftool.org/forum/index.php/topic,4172.msg19805.html#msg19805).

- Phil
Title: Re: Fixing corrupt cr2
Post by: MOL on July 05, 2017, 11:41:20 AM
Have you tested that, Phil?  When I try to extract the preview image with DCRAW, I get exactly ... nothing ...

-Uwe
Title: Re: Fixing corrupt cr2
Post by: Phil Harvey on July 05, 2017, 01:31:46 PM
It worked with the sample provided.  Nice picture of a little girl sliding down a slide (but sadly focused on her shoes instead of her face).

- Phil