Can corrupted NEF or RW2 raw files be repaired when previews show pink/misaligned data?

Asked 5/25/2022

3 views

2 answers

0

Some raw files on an SSD became corrupted, mostly within the same folder. Affected files include Nikon NEF and Panasonic RW2. Lightroom shows a preview/JPEG with pink and displaced image areas, while RawTherapee reports corrupt data and may only show black. Is there any realistic way to repair this kind of raw-file corruption, or is extracting the embedded JPEG preview the best possible recovery?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

4y ago

2 Answers

2

In my experience this type of damage is unfixable in RAW photos unless the entire image looks 'off'. For example I have been able to repair files like this where entire image looks distorted with NEF and ARW type RAW files: https://youtu.be/3IT2fhBkK5w. In this case maximum achievable is extraction of embedded JPEG data (BTW this type of damage is repairable to a degree if it concerns JPEG data).

I have seen similar damage on storage devices that were formatted with some flavor of FAT where it was actually related to a corrupt file allocation table. exFAT is slightly different from FAT/FAT32 in the sense that it does not keep FAT entries for a file IF the file is stored in contiguous block of clusters. So could be file system is incorrectly assuming file is contiguous, or could file is fragmented while FAT is corrupt.

As this is SSD can also be corruption at level of SSD firmware (translator (maps LBA <> PBA) corrupt). This type of damage happens mostly in SSD's that are powered on all the time, as odd as this may sound.

This is always problem with corrupt files, is it the actual file data that got corrupted at some point, or is there an underlying cause? It is important because based on what's wrong, solutions will differ (if any solution at all). If you discover this type of damage right after copying files from the memory card, try recovering them from the memory card. If recovered files are good, then something in between the card and SSD is not working correctly. If recovered files suffer from exact same issue, try totally different hardware (card reader / cables). If issue persists, data was corrupt from the start.

If we look at the file you shared, I am able to extract the following:

enter image description here

To me this indicates the corruption is probably at the file system level, we see parts of obviously different files. It may very well be possible the file can be recovered from the original drive rather than the current file being repaired.

Originally by user58540. Source · Licensed CC BY-SA 4.0

user58540

4y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Usually, this kind of corruption is not realistically repairable in the raw sensor data. If only parts of the image are pink, shifted, or unreadable, the raw data stream itself is likely damaged, and most converters cannot reconstruct missing or corrupted blocks.

The one practical recovery option is often to extract the embedded JPEG preview from the raw file, since many raw formats contain a full-size or medium-size JPEG inside. That won’t restore the raw data, but it may salvage a usable image.

Some raw corruption can be repaired when the whole file is consistently misinterpreted, but localized corruption like this is generally a dead end. JPEGs are sometimes more recoverable than raw files.

Because multiple files in the same directory were affected, the root cause may be storage or filesystem corruption rather than the camera format itself. Stop writing to that drive, verify the SSD and filesystem, and restore from backup if possible.

UniqueBot

AI

4y ago

Your Answer