Can corrupt Canon CR2 RAW photos be repaired?
Edit 2nd of March, 2019: After having successfully repaired a number of corrupted CR2 (Canon RAW files) rather than having JPEGs extracted, I now accept CR2 files for my photo repair service.
Unfortunately I know of no software that can successfully repair corrupt Canon CR2 RAW Canon files. This known incapable software includes Stellar JPEG Repair (now called ‘Stellar Repair for Photo‘) which at least is claiming to be able to do so: “Steps to repair CR2 files by using Stellar Repair for Photo“. A closer look shows the tool tries to extract JPEG data and that it not particularly good at it.
Please leave a comment if you do know of software capable of repairing corrupted CR2 Canon RAW files, because I’d love to link to it!
That being said, depending on your situation there may be options:
- If the corrupt CR2 file is the result of using file recovery software to recover lost files from a memory card it is likely the corrupt files are a result of file fragmentation. Almost all file and photo recovery software fails at recovering non contiguous files. Our software JPEG Recovery LAB can however reconstruct such files.
- Alternatively if full frame JPEGs are an acceptable alternative use JpegDigger to recover the photos.
- Post recovery or not related to file recovery pr undelete at all: It is often possible to extract JPEG data from corrupt Canon CR2 files using JPEG-Repair.
- I have had some success repairing corrupted CR2 files manually and will probably at some point add this functionality to my photo repair software.
Recovering CR2 raw images from a memory card
If corrupted CR2 photos are the result of undelete or file recovery then they are often beyond repair. If the files don’t contain the correct data (for the largest part at least) in the first place then there is nothing to repair. Best solution is trying different software to recover the photos.
Memory cards in devices such as Canon EOS digital cameras are typically using FAT32 or exFAT file systems. Due to how these file systems keep track of clusters allocated to a file and the fact that this info is usually lost after file deletion file fragmentation is an issue. Generic file recovery software can not determine clusters allocated to the lost file using file system structures.
Specialized photo recovery software often ignores the file system and scans for file headers or magic bytes to located lost files. Using this method it is possible to figure out where the CR2 file starts. Typically the software keeps scanning until it finds the next image header and assumes everything from the file signature upto the next file start belongs to the lost CR2 photo. However for fragmented or non contiguous files this is not the case. These header/footer scanners can not recover intact non contiguous files.
Recovering such images requires advanced file carving software like JPEG Recovery LAB. Using a variety of techniques JPEG Recovery LAB is able to reconstruct non contiguous corrupt Canon CR2 files from memory cards.
If the full frame JPEG is an acceptable solution you can try JpegDigger. It scans the media for CR2 magic bytes and then extracts full frame JPEG data from the lost or deleted files.
Howto recover corrupt Canon CR2 RAW photos
JPEG Recovery LAB does not repair corrupt CR2 files after they already have been recovered by other data recovery software! It needs to scan the memory card or a disk image file of that image card to recover the corrupt CR2 raw files. The procedure is a 5 step process.
1. Download and install JPEG Recovery LAB
You can install JPEG Recovery LAB like any other Windows software so I will not cover this in detail.
It is however good to be aware of the fact that the software is not digitally signed and frequently updated. As a consequence Windows SMART Screen may warn you the software is potentially unsafe. You will have to take my word for it when I tell you it is safe.
Also note that the system requirements are high, specially when it comes to RAM: 2 GB per CPU core, 8 GB minimum. The more cores, the better.
2. Select the memory card or memory card
- In most cases Windows will assign the memory card a drive letter and if so, select that to scan the card. This is preferred specially if you need to recover only deleted files (so, not lost due to accidental format or corruption).
- If no drive letter is assigned you need to select the device itself (probably a card reader of some sort).
- JPEG Recovery LAB can also process a so called raw disk image, that is a sector by sector copy of the memory card.
- Even if you’re only after CR2 photos it is advised to select JPEG and MP4 video too if the camera was to configured to also generate JPEGs alongside the CR2 photos and if you recorded video. Knowing where these files are helps JPEG Recovery LAB determine where to look for the CR2 files.
- Low on memory (8 GB or less)? Limit the number of parallel threads in settings . Also it helps if you disable video preview.
- If you only need to recover deleted files check the option to only search unallocated space. This option is only available if you’re scanning a drive letter.
JPEG Recovery LAB needs a lot of time, so be prepared for that. It is also not uncommon that it appears to be stuck in the sense that the progress for a specif operation doesn’t change for a while. You can view the Resource usage TAB and see JPEG Recovery LAB is hard at work.
The further into the process the faster the recovery tends to progress as the number of combinations JPEG Recovery LAB needs to test decreases.
5. File selection
As soon as ‘files so far’ is non zero you can preview files and even copy them in the results TAB. By default JPEG Recovery LAB organizes files into three categories:
- Contiguous:It was determined these files are intact and stored as a contiguous block of data.
- Fragmented: It was determined these files are intact and correctly reassembled fragmented files.
- Damaged: These files are corrupt and/or can not be reconstructed.
All previews are generated from actual image data! This means that if the preview is intact it is guaranteed the corrupt Canon CR2 file can be recovered correctly and intact too.
Howto extract JPEG data from corrupt CR2 RAW files
In general Canon CR2 files embed a JPEG file (or more than one even). There are tools available for extracting those, but most work only with intact CR2 files. I have created a utility that ignores CR2 internal file structures and simply scans the file for JPEGs. Once detected it parses the JPEG to make sure it is valid.
Even with corrupt CR2 files it often possible to extract the JPEG data. Something is better than nothing. Note than some photo repair software that claims to be able to handle corrupt CR2 files does the exact same thing! Rather than actually repair a corrupt Canon CR2, they simply extract JPEG data. Since version 1.8.63 JPG-Repair also supports this feature.
DIY JPEG photo repair
JPEGREPAIR.NINJA‘s JPEG-Repair is a unique DIY JPEG photo repair utility!
Price: only $22,95 (for home/personal use)
- Repair corrupt and damaged JPEG files
- Fix corrupt JPEG header
- Repair Invalid JPEG markers
- Repair damage due to bad sectors
- Improve corrupt JPEG image data by patching JPEG bit stream with visual feedback
- Recover JPEG data from corrupt RAW photos such as CR2 and NEF
- Does not re-encode JPEG image so original quality is preserved!
- Preview of repaired file
- Does not alter original files
- No need to upload photos to remote servers
- Free version shows previews + saves low resolution examples.
- Now includes a photo heal tool to remove unwanted objects (such as grey lines caused by JPG-Repair!
You can use this download to update a registered version. Simply copy files over existing files. JPG-repair Toolkit will continue to work with your license key.
I try to keep a list of recent changes here.
JPG-Repair helps you save JPEGs from corrupt RAW photos
JPG-Repair Toolkit currently offers support for the following RAW photo formats:
If your format isn’t listed please send me a few intact samples so I can add support for it.
How to extract JPEGs from RAW photos using JPG-Repair
- Select drive > folder > RAW file(s)
- Check option ‘assume header okay’ (this is about the JPEG header, JPG-Repair doesn’t care if the RAW photo is corrupt or not)
- Select a minimum resolution.
For example, 640 x 480 skips 160 x 120 thumbnails and grabs the first next JPEG that is larger. Assume this is a 1620 x 1080 format JPEG it will save that. However, if further on the RAW file embeds a 7360 x 4912 JPEG, you’ll miss that. So, to skip the first two smaller files set minimum resolution to 3.0 mega pixels (2048 x 1536). So, per ‘run’, JPG Repair extracts ONE file per RAW photo. You can still process multiple files in batch. JPG-Repair shows previews and automatically saves the files to the source folder.
- Click ‘Repair’ to start processing the RAW file(s)