I have a number of raw images which were restored after deletion, when I open them in image viewer they seem to be fine, but if I open them in Photoshop image seem to be corrupted. How is it possible and is there a way to extract this uncorrupted image?
2Raw files typically contain both previews (jpegs) as well as the raw sensor data. If a file corruption occurs it is often that only somewhere in the middle or the end of the file some bytes have the value 0 where they shouldn't. Thus the preview might be fine but not the true raw part of the image.– UnapiedraJul 24, 2013 at 12:08
Opening the file in a HEX editor is often informative but in this case I couldn't find any hints what might be corrupted.– UnapiedraJul 24, 2013 at 12:17
There is no such thing as partially corrupted. If some of the data is wrong, it is corrupted.– ItaiNov 9, 2017 at 2:24
If the data is corrupted, there isn't necessarily a whole lot that can be done to help you since part of the data is gone (unless it got distorted in some kind of a pattern that you can identify and reverse). CR2 stores a preview jpeg in addition to the RAW data, so your viewer is simply looking at the JPEG rather than the RAW data. The RAW data on the other hand is corrupt and likely unrecoverable.
Although the RAW file is probably shot, the JPG can be extracted and saved. One of the easiest ways to do this is with IrfanView, a handy little free utility. Using IrfanView, I was able to save a JPG w/ resolution 1936 x 1288 -- I'm not sure how this compares to full resolution of your RAW file, and it's not going to have all the data that the original RAW did, obviously, but it'll at least get some form of picture back for you.
AFAIK CR2 contains full res JPEG (so equal resolution as actual RAW). Nov 3, 2021 at 2:40
CR2 is based upon TIFF, containing three JPEG versions (including the raw data) and one TIFF preview. See http://lclevy.free.fr/cr2/#parsing for more information. You could rename the file to a TIFF file and see which TIFF layers hold some recoverable information.
Everything in CR2 is JPEG. The thumbnail, the full res preview are lossy, the actual RAW photo is lossless JPEG. Getting 'preview' JPEG is indeed often possible, example youtu.be/kM5erUpF08U Nov 3, 2021 at 2:39
As others have said, it sounds like you'll be able to retrieve the jpeg preview.
Before you give up on the raw file, if it was me I would try a different raw viewer, editor and/or batch converter. It might not get you anywhere, but some software can be fussier about what constitutes a corrupted file than others.