Why do images get "corrupted"?

  • I have had my Nikon D40 for a while, and some of the pictures are coming out distorted. Two examples are below:

    So my questions are:

    1. How do I fix them after the fact? - i.e. after they have been imported from the camera - if possible
    2. How do I prevent future pictures from being distorted like this?


    alt text and alt text

    Could you provide a bit more information - for example, what exactly are the photos you've posted? I see that some of them are distorted, but which came from where, and how did you get the other versions of what you posted?

    The photos I posted are taken by myself on my Nikon d40x. Both of them were taken from my computer - which I copied from the Nikon. I Both of the pics are not the exact same pic, but I was just snapping multiple pics of my son - and that's how these came out. So I want to know how I can fix them.

    marcamillion, The second image is unrecoverable, unless the issue was with your computer or card reader — there is no information left in that photo, just the flat gray. You might be able to fix the first image by cut/pasting the blocks around and adjusting their color to match the rest… But it’s probably easier to go take some more photos of your son after you’ve determined what caused the problem in the first place.

    Do the pictures look the same on the camera or only on the computer after import? Did you try to re-import them? Does all of your images suffer from this data corruption?

    I get this phenomena regularly from my 2 year old Olympus u550. The images, however, look perfectly fine when viewed from Windows Explorer after copying to the PC hard drive from the camera. Only when I upload them to my web site(s) do I see any distortion and it is completely random in respect of which of a set of, say, 40 photos it affects. Always the bottom half or less of the affected shots. They always look fine using the camera viewer. So I can't understand how the SD card can be to blame if they look OK locally but not when uploaded and online. I have managed to solve this a few times b

    Try this, when you are saving your image, use - Save for web option. Do not use progressive method when saving pictures.

    Have you tried to upload the same pictures several times? I have the same problem, but when I view the image directly from the memory card, it looks fine and I can usually get an uncorrupted image from the same file on the SD card the next time. don't know why it keeps happening at random, but the problem does not seem to affect the image file itself. If you have this issue, don't ever delete from your SDcard until you have a clean image on your computer.

  • mattdm

    mattdm Correct answer

    10 years ago

    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:

    enter image description here

    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.

    +1 - I have to agree, it looks like the SD card needs replacing. I've seen similar issues with bad hard drives in the past when the file data gets corrupted by bad sectors.

    Yeah, looks definitely like damaged JPGs.

    Turns out...it was the USB ports on my PC. Because when I connected my Nikon to my Macbook Pro, it copies all the images perfectly, and the above images came out nicely. So it is bitter sweet. Now I know what's wrong, it just turns out to be all my USB ports :|

    Some computer cases have USB ports on the front and other ones on the back. Whichever side failed, try the other side. Sometimes devices can be strangely sensitive to this, for reasons I cannot explain.

    @Oddthinking: it may be that there's bad internal cabling, or the ports are actually bad. Or it may be that the ports are on a shared bus and other devices are interfering.

    Maybe. Or just leave my answer accepted, since it includes the possibility, even if it was the last on the list. :)

    It may be a reading speed problem, which affects your specific card/reader/computer combination. If possible, do several tests changing only one thing at a time (You already did when you used your Mac). Try a different card in the same reader with pictures from the same camera, then the same card, same camera different reader, etc. (You get the idea). I think that at some point, some of your device's manufacturer is lying about some speed specification, so the computer is trying to read faster than the car can response, or the reader, etc.

    I recommend doing the test, finding who's the one to blame, and, if possible, avoid the brand in future buying.

    @mattdm: Can you give a general advise on how you did fix the image? I have the similar issue and doesn't have original photos.

    @Isaac I selected the obvious squares and moved them around until they were aligned. Then I used the curves tool to match the colors. If you're using Photoshop, you could try this to match colors. For Gimp, it's harder, but this might help.

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM