20
\$\begingroup\$

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?

Thanks

alt text and alt text

\$\endgroup\$
7
  • \$\begingroup\$ 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? \$\endgroup\$
    – ahockley
    Commented Dec 27, 2010 at 3:48
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Dec 27, 2010 at 4:20
  • \$\begingroup\$ 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. \$\endgroup\$
    – ieure
    Commented Dec 27, 2010 at 6:19
  • 1
    \$\begingroup\$ 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? \$\endgroup\$ Commented Dec 27, 2010 at 18:13
  • 1
    \$\begingroup\$ 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 \$\endgroup\$
    – user10526
    Commented Jul 8, 2012 at 8:36

7 Answers 7

31
\$\begingroup\$

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.

\$\endgroup\$
10
  • \$\begingroup\$ +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. \$\endgroup\$
    – Joanne C
    Commented Dec 27, 2010 at 14:41
  • \$\begingroup\$ Yeah, looks definitely like damaged JPGs. \$\endgroup\$
    – Leonidas
    Commented Dec 27, 2010 at 16:44
  • 10
    \$\begingroup\$ 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 :| \$\endgroup\$ Commented Dec 28, 2010 at 6:57
  • 1
    \$\begingroup\$ @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. \$\endgroup\$
    – mattdm
    Commented Feb 15, 2011 at 18:17
  • 1
    \$\begingroup\$ Maybe. Or just leave my answer accepted, since it includes the possibility, even if it was the last on the list. :) \$\endgroup\$
    – mattdm
    Commented Mar 28, 2011 at 2:00
7
\$\begingroup\$

One possibility is operator error. Any one of these will do it:

  • If you took out the card from the camera before it was finished writing. In this case your pictures are lost since they were never stored correctly.
  • If you took out the memory from the reader before it was finished reading (If you use Windows, you should use the 'Disconnect Removable Device' or similar icon and wait for the message that says it is safe to remove).
  • If you disconnected the camera (and you were transferring via USB) before the file was completely read. In these two latter cases, the files may be all right on the card.

If none of this is the case, I agree than an the SD card is most likely dead. It can happen with any card, nothing is perfect 100% of the time but if you buy better ones the likelihood of failure is less. The best ones are usually from Lexar, Sandisk (Black or red, not blue) and Kingston.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ I think you mean “one other possibility.” \$\endgroup\$
    – ieure
    Commented Dec 27, 2010 at 17:18
5
\$\begingroup\$

I had similar issues with images on my Nikon D70. Occasionally the camera showed a 'CHA' error message, images written to the card were corrupt (but could be resurrected by a data recovery tool).

As it turned out my camera has contact problems at the CF card slot. Sometimes reinserting the memory card helps, sometimes I have to use contact spray to get my camera to talk again with the CF card.

\$\endgroup\$
1
  • \$\begingroup\$ That would be right as CHA is a message from the camera reporting card access problems. \$\endgroup\$ Commented Jun 5, 2013 at 19:27
5
\$\begingroup\$

That is what a JPEG image looks like when the file is corrupted.

By corrupted, I mean a data corruption problem: one or more bits in the file are not what they should be - zeroes becoming ones or vice versa. JPEG is a lot more susceptible than any uncompressed format as a single wrong bit may affect the entire rest of the picture from that point onward, making the bottom half of your whole picture purple or black or something, or non-recoverable (may be rendered as gray or transparent). In this case, the pictures are rotated due to shooting in portrait so it's the same effect, but sideways.

The file may be corrupted because:

  • The SD card has gone bad.
  • The memory in the camera is bad.
  • Your SD card reader at your computer is bad or you have general hardware issues with your computer. Is it self-assembled/do you overclock?
  • or the Sd card writer in the camera is bad.

It's most likely the first one, in which case it's an easy fix - throw the card out. But before you do, try another card - of a different brand/batch - in the same camera and see if you get any of the same problems. If you do, then it's time to look into whether the camera is under warranty.

\$\endgroup\$
2
\$\begingroup\$

I once had a bad sensor do this sort of thing. Canon had recalled the camera, but by the time I'd found this out it was too late for mine to be repaired/replaced.

Sometimes an overheating camera will behave differently so switch it off after a photography session to let the sensor and electronics cool down a bit.

\$\endgroup\$
1
\$\begingroup\$

FWIW, I see these a lot. Common causes have already been given in other answers, you need to determine cause if possible by swapping all hardware involved, reader, cables, different USB port etc.. If it's the memory card itself there's not much you can do, NAND write/erase cycles are finite so may simply be wear.

What I like to add though is that this type of damage can often be repaired. If image displays only partially there's two things I always check:

  • File size compared to similar intact files. If you miss for example about 1/3rd of the image AND file size is also about 1/3rd less than comparable intact image then data is simply missing

  • Open file in HxD, sometimes you'll find 1/3rd of data simply being zeros or repeating byte pattern (FF FF FF etc.).

If image damage can not be explained by above, the image may be repairable. I made software that first of all removes 'illegal' byte combinations that may cause rest of the image to be grey. Once we remove these the image can often be decoded all the way though be it distorted:

enter image description here

We can then further repair the image by manipulating the file at the byte or MCU level:

https://youtu.be/A33zn_sgm30

Too late for OP probably, I hope it can help someone else some day.

\$\endgroup\$
0
\$\begingroup\$

It's common for this type of corruption to occur when you remove the memory card from the camera, and reinsert it without formatting it. When you pull the card and insert it into a computer, any number of bad things can happen to the card to corrupt it. Your only defense against this corruption is to format the card every time you insert the card into the camera. Formatting the card in camera insures the card is prepared to accept data from the camera. If you format the card and still get corruption then the card is bad.

There is a 'Format Card' option on your Nikon DSLR menu, and perhaps even dedicated buttons for it ( there is on the D90 ). Each time you insert the card, format it and you'll see this type of corruption minimized.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ To clarify why this answer is wrong and why things don't work that way: Formatting a memory card writes new file-system control structures to a few select sectors' worth of the memory card's storage. Image data is not stored in this sector, but is stored in many different sectors which are electronically independent. This is also why a format takes a second or two, instead of several minutes. If the memory card's semiconductors do begin to fail due to physical deterioriation, there is really no sequence of electronic signals (including reformatting) that you can send to repair that failure. \$\endgroup\$
    – user16009
    Commented Jan 28, 2014 at 4:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.