Repair an image

Posted on 2011-10-21
Last Modified: 2012-06-27

 I have a few jpeg's on my windows xp machine that won't open.  When I try to open in image viewer or picasa they seem to be corrupted.  It is really weird, when I try to attach them in gmail it gives and error.  Does anyone have a good image file repair program?  Thanks
Question by:rickBergami
    LVL 38

    Assisted Solution

    Hello Rick

    "When I try to open in image viewer or picasa they seem to be corrupted."

    In what way do they "seem" to be corrupted?
    What error messages do you get, if any?
    Does it display part of the image?
    Do all the affected images display with exactly the same kind of corruption, or with the same error messages if nothing displays?

    If you are seeing part of the image and the rest of it is all weird, could you possibly take a screenshot of the image in the program that is trying to open it and attach this so we can get an idea how it is displaying.

    Better still, if the images are not too personal, could you maybe attach one or two for us to inspect?

    If these images were recently copied over from a digital camera, then do you still have copies on the camera's storage card?

    If they were deleted, but the transfer was very recent and you have not used the camera to take more photos since, then it MIGHT still be possible to run a data recovery program to see if the images on the camera can be recovered intact.  My first choice of data recovery program is GetDataBack, but you have to pay for a licence to actually do the final recovery once it shows what files can be recovered. $69 for the FAT version.

    There are free data recovery programs also, for example Recuva, but I haven't used this software.

    I cannot provide you with any details about image REPAIR software, because I have not found any that have actually worked for me.  So any suggestions I would make would be based purely on Google searches.

    The other alternative would be to try and find an image viewing application that IS able to open the images and display them correctly, and then resave them.  There are hundreds of image viewing programs around, so perhaps it might be easier to attach an image or two and let some of us try and find a program that can open them.

    LVL 38

    Assisted Solution

    The other issue is WHY the images became corrupt to begin with.

    It is possible that they have been on your hard drive in that state for a while but you haven't noticed.  A JPG imaeg comprises thumbnail data and the main image data as separate data blocks.  Even a corrupt JPG might still show the thumbnail correctly in Windows Explorer or in an image browsing application that extracts and displays the thumbnails in the browser rather than creating the display thumbnail from the main image.

    There is a possibility that your hard drive is beginning to show signs of failure.  Even if this is not the case, I would urge you to make copies of your existing images to another safe storage medium now.  If you have a second hard drive, then test that with a full ScanDisk and then copy all your images (and other important files) there.  Note: Don't copy special folders like "My Documents" or "My Pictures", just create NEW folders in the destination drive and copy the CONTENTS OF those special folders there.

    You then want to segregate the good from the bad.  You could Right-Click on the top image in a folder and choose "preview" to open it in the Windows Pictuer and Fax Viewer and then arrow right through the images in that folder until you get to a bad one.  The little floppy disk icon at the bottom is a "Copy To" function.  In the "Copy To" dialog you can create a new folder in the one being browsed and name it "corrupt", then copy the image to it and delete it from the main folder either from the Picture and Fax Viewer at the time and move on, or do so later.

    Author Comment


     When I open in paint is says "preview not available". When I try to open in picasa it says image may be corrupted.  It does not display any part of the image.   We do not have a copy of the images on the camera still and the were opening at one time.  I will see if we can recover using getdataback.  I have used that before.  Thanks for your help.
    LVL 38

    Accepted Solution

    The assumption I made was that the images on the camera would be stored on a removable flash memory card rather than in the camera's own internal memory.
    If so, and if your computer has a card reader that takes the same type of memory card as used by your camera, I would suggest that you remove the card from the camera meantime to prevent anything else being written to the card.

    Recovery programs like GetdataBack should be able to see the storage card in the reader slot as a Removable Drive and run the scanning process on it there.

    Of the "repair" programs I tested a while back for somebody else here with the same issue, here are the titles I used:

    Shows you the image as it was and overlays detils onto it telling you the issue that it encountered, and prompts you to buy the licence.  In my tests it told me that the images were missing pixels in a certain range.  Given that you cannot put back something that is missing, the program would not be able to "repair" the image, and I would guess that it would just provide a recovered thumbnail from the image.  This is easily extractable with other free tools if it is intact, so for those particular images the software did not work.

    I tried about 7 other programs entitled "JPEG Recovery" and "JPEG Repair" on the same corrupted JPG images, and they all either provided a thumbnail "preview" that was so small or almost totally obscured by a watermark overlay that it was impossible to determine whether anything could be recovered if I had been inclined to pay for a licence.

    Don't let me put you off trying some of these though, because image corruption can be caused by even a tiny segment "marker" being missing from an otherwise intact file.

    One thing you can do is to try and assess where the corruption exists in the affected images using a small free and standalone program by Calvin Hass named JPEGsnoop:

    Opening a corrupt JPG in this program will at least give an indication of whether data is missing or whether "markers" are missing, but to try and attempt repair using the suggested Hex Editing technique he describes on his site is hit and miss and very technical.

    Some useful info from his pages:

    If you can attach one of the corrupt images I would really like to see if I can find a program that will open the image and allow it to be saved out.
    LVL 16

    Assisted Solution

    Have you considered the possibility that they are not JPEG images but are mis-labeled GIF, TIF or BMP images?  This happens quite often, and while some viewers are able to show them anyway, even if they have the wrong filetype extension, others will say that the image file is corrupt.

    Try changing the filetype to .gif, .tif and .bmp to see if any of them make the image viewable.
    LVL 38

    Expert Comment

    Thank you Rick

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    PaperPort is a popular document imaging/management product from Nuance Communications (, previously known as ScanSoft. PaperPort is in widespread use by both individuals (…
    In a previous article here at Experts Exchange (…
    The goal of this is to tech the user how to export photos out of Lightroom and the different options they have. Select which photos you want to export : Select where you want to export and with which options : Export :
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now