Why recovered photos turn grey or shift halfway down
You got your photos back from a broken memory card or disk, but many of them open fine at the top and then turn grey, slide sideways or change colour from some line down. That doesn't mean the rest of the picture is gone. Usually only a few kilobytes are missing.
What happened to the file
A JPEG photo is one long stream of compressed data, written block after block from the top left to the bottom right. Each block only says how it differs from the block before it, and its place in the picture is simply its place in the stream. Nothing in the data says “this block belongs in row 412”.
When a small part of that stream is lost, for example a few sectors of the card that couldn't be read, or that the recovery program filled with something else, the picture data after the gap is still there and still fine. But a photo viewer reads it as if nothing were missing: every block after the gap lands in the wrong place, and every brightness and colour difference starts from the wrong value.
That is why the damage always looks the same way:
- the top is fine, up to the place where data was lost;
- from there on the picture is shifted sideways and often has the wrong colours, because the blocks after the gap are out of place;
- the bottom is grey when the viewer reached the end of the file before the end of the picture (it paints whatever is missing grey).
Can it be repaired?
Often, yes. The data after the gap only has to be put back where it belongs. memories.repair finds the gaps, decodes every surviving piece on its own and places it again. Most cameras and phones store a small preview of the photo inside the file. When that preview survived, the pieces can be matched with it very precisely, and their colours restored. The parts that are really lost are filled in from the preview, so they look a bit blurry, but the rest of the photo is the original.
When the preview is missing, the pieces are lined up by their edges and by how much data was lost. That is less certain, so the result shows which pieces to check, and you can nudge them into place yourself.
What can't be repaired
- Data that is really gone: those parts can only be filled in, not brought back.
- Files that were overwritten or encrypted (ransomware), or that are mostly missing.
- Formats other than JPEG, such as RAW, HEIC or PNG, and progressive JPEGs.
Before you try anything
- Keep the original files as they are. Opening a broken photo in an editor and saving it again throws away the hidden data after the gap: the grey and shifted parts become the picture.
- Keep every recovered file, also the ones that look broken or are only partly there.
- Work on copies, and don't use tools that “repair” files in place.
Recovered your photos with PhotoRec, Recuva or Disk Drill? Why carving tools give broken photos.