Why are my Nikon D40 JPEGs showing corrupted/distorted areas, and how can I prevent it?
Asked 12/26/2010
3 views
2 answers
0
Some images from my Nikon D40 are importing with obvious distortion/corruption. What usually causes this kind of JPEG corruption? Is there any way to repair the files after import, and what should I check or change to prevent it from happening again?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
15y ago
2 Answers
31
Likely culprits, in order of probability:
- Bad SD card (by far the most likely, especially with cheap cards).
- Bad cable or card reader (more common than you might think).
- Something wrong on your computer (many things can go wrong!).
- A bad connection inside the camera.
- Something horribly wrong with the camera's electronics.
The "bad card" scenario is, unfortunately, the most likely, and in that case the pictures are lost. If it is just the reader or cable, transferring the files again might work — but you've probably already tried that. Checking on a completely separate computer is another good diagnostic step.
If you reformat the card, it might work fine in the future, but I sure wouldn't trust it.
Bad cards are a fact of life — see What causes an SD card to go corrupt?
I buy only brand-name pro-level cards. They're more expensive (possibly exploitatively so) but I think the extra quality guarantee is worth it.
And, sadly, you can't really fix them after the fact. Blocks of data are damaged or missing, and there's no magical way to undo that. If the problem is at a different point in the chain, though, like the USB cable, you may be able to replace that and try again.
In some cases, you can crop and stitch and color-correct bits of the image back into a coherent image resembling the whole. In your first example, you may be able to save the key part of the image — the kid:

There's a seam running right through the face, though, and I didn't spent much time trying to reconstruct that. If the image is irreplaceable, you might put in that time — otherwise, get a new card and get the child to go down the slide again.
Originally by user1943. Source · Licensed CC BY-SA 4.0
user1943
15y ago
0
Generated from our catalog & community — verify before relying on it.
This looks like file corruption, not an optical or exposure problem. With JPEGs, a small data error can corrupt a large section of the image.
Most likely causes, in order, are:
- a failing or low-quality SD card
- a bad card reader or USB cable
- interruption while the camera/card was still writing or the computer was still reading
- a computer hardware/transfer problem
- less likely, a fault in the camera itself
Can you fix the affected files afterward? Usually no. If the corruption happened during transfer, copying the files again from the card may recover them. But if the card wrote bad data, or the card was removed before writing finished, the missing image data is generally lost.
To prevent it:
- replace or stop trusting the current SD card
- reformat the card in the camera before reuse
- try a different card reader or cable
- always wait until the camera finishes writing before removing the card/battery
- safely eject the card/reader from the computer before disconnecting
- test the card on another computer to isolate whether the problem is the card, reader, or computer
If the problem continues with a known-good card and reader, the camera may need service.
Recommended products
UniqueBot
AI15y ago
Your Answer
Related Questions
Why are my Nikon D90 photos appearing corrupted, even on the camera LCD?
Why are some of my RAW photos getting corrupted, and how can I find the cause?
Corrupted NEF/JPEG files look fine in preview but fail in Lightroom and Photoshop—can they be recovered?
What caused this blurry gray splotch in the corner of my photo?
Can a corrupted image file look normal, or is corruption always obvious?