File appears to be damaged, corrupted or is too large

By | July 4, 2018

Windows Photo Viewer can’t open this picture because the file appears to be damaged, corrupted or is too large.

If try to open a corrupt JPEG file in the Windows Photo Viewer it will tell you: Windows Photo Viewer can’t open this picture because the file appears to be damaged, corrupted or is too large.

This message indicates that at least the header of the JPEG is corrupt. If damage is limited to the header then it is likely the picture can be repaired if you have a known good image shot with the same camera. If damage extends beyond the header repair is unlikely.

Windows Photo Viewer can’t open this picture because the file appears to be damaged corrupted or is too large

Uh oh!

In this blog post we’ll address:

  • Check if JPEG can be repaired using a hex editor
  • Repair corrupt header using hex editor
  • Repair using a JPEG Repair Utility

Check if picture can be repaired

Most pictures that are sent to my JPEG Repair service that are beyond repair suffer from:

  • Entirely filled with zeros
  • Entirely filled with a repeating byte pattern (FF FF FF etc.)

You can check this using a hex editor like HxD.

If the file appears to contain data, you can use the same editor to repair it using the header of an intact JPEG.

Repair a JPEG using a hex editor

Using HxD: Use Search > Find, search for FF DA using HEX data type. If not found the file is beyond repair.

Find the last instance if FF DA using HxD

Find the last instance if FF DA using HxD

It is possible multiple instances of FF DA are found, you need the LAST one. There may be a few if the JPEG included a thumbnail and preview.

Note: If you find many FF DA byte combinations then you’re probably not looking at JPEG data but random binary data. The file then is probably beyond repair.

Write down the address (Using View >  Offset base you can switch to decimal numbers if you like). Now search for FF D9. Or, go to end of the file which is where you’d normally find FF D9.

Once found, select the entire block including the last FF DA upto and including FF D9 right click > copy.

Open a new file > Paste Insert > Save as ‘image.jpg’. You have now copied the image data to a new file.

Open a known good file that was shot with the same camera, using same resolution and orientation (portrait/landscape).

Use Search > Find, search for FF DA using HEX data type.

Search, set data type to Hex-values

Search, set data type to Hex-values

It is possible multiple instances of FF DA are found, you need the LAST one.

Select the block preceding the FF DA bytes all the way to the start of the file (FF D8)

Switch to your image.jpg file TAB containing the image data, make sure you’re at offset 0 (zero) Paste Insert > Save the file.

If damage was limited to the header you should now be able to open your file. Open and Save it using something like Paint.NET (free) to update the file thumbnail (if any).

Repairing a JPEG using JPEG repair software

Using JPEG Repair software to fix the “File appears to be damaged, corrupted or is too large” error message.

If the above procedure is too intimidating there is an easier way to accomplish the same. Using my utility JPG-Repair (click to download) and a sample or reference file you can patch an intact header on your corrupt JPEG files. The freeware version allows for one file to be repaired at the time.

Required: Intact sample. Sample = JPEG shot with same device + same settings. Place this file in the same folder as the corrupt files and name it sample.jpg.

JPG-Repair shows previews of the JPEGs it's able to repair

JPG-Repair shows previews of the JPEGs it’s able to repair

  1. Place the corrupt or damaged JPEGs + sample file in one folder. The sample needs to be named to “sample.jpg”. Work on copies of the corrupt JPEG photos!
  2. Double click “jpgrepair.exe”. There is no setup, just a single executable file.
  3. Select the drive containing the copies of the corrupt photos.
  4. Browse to the folder containing the copies of the corrupt photos. If you have for example copied them to a folder on your desktop, you typically select the C: drive > Users > Your username > Desktop > and then the Folder.
  5. Select the JPEGs you need to repair. The free version does not save files.
  6. Click “Repair”.

This short video explains the simple procedure as well:

If all went well then the “Windows Photo Viewer can’t open this picture because the file appears to be damaged, corrupted or is too large.” error is no longer displayed and it will now show your photo.

6 thoughts on “File appears to be damaged, corrupted or is too large

  1. Ricky Mullen

    I have about 90 pictures which I took on a recent trip to London using my samsung S8. Unfortunately there appears to have been some kind of issue with the SD Card and all the pics are showing this error. I’ve tried the repair but it continually asks me for a sample. How do I do this? Many thanks.

    Reply
    1. Joep Post author

      Hello,

      Sample = photo that is intact that was shot with same camera + same settings to be named sample.jpg and placed in same folder as the corrupt files. See: https://youtu.be/ngnR4_1WQ88

      If it doesn’t work for you send me a few of the corrupt images + an intact sample from same phone (joep@disktuna.com).

      Reply
  2. Computer Data Recovery

    Whenever we are storing some high storage files or applications on our system, we sometimes find out that the applications get damaged. This is mainly because of their size. The article has some approved restrictions for such problems which will help the users to rectify these problems.

    Reply
  3. Phil

    A friend of mine has lost about 56 images from his usb stick – Unvalid Jpeg Marker type is Found.

    I have checked and all the files have data, the problem is these are from multiple sources that have been sent to him from family and friends over several years. so I cant use your software as he did not take the pictures and they were taken on many different devices anyway, so my question is:

    Would it be impossible to restore these files in this situation ? is there a service that can try ?

    Reply
    1. Joep Post author

      Hello,

      No, not impossible by definition at all. It’s just how the tool works (requiring reference file) because it makes repair so much easier.

      Can you sent me a few, or upload the files sonewhere so I can have a look?

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *