Windows Photo Viewer: File appears to be damaged, corrupted or is too large

By | October 5, 2018

If try to open a JPEG file with a corrupt header 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.”

In this blog post we’ll address:

  • Check if JPEG can be repaired using a hex editor
  • Repair corrupt header resulting in error ‘File appears to be damaged, corrupted or is too large’  using a hex editor (free)
  • Repair using a JPEG Repair Utility

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 but not impossible!.

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

Uh oh!

Howto fix File appears to be damaged, corrupted or is too large with JPEG-Repair:
This repair (File appears to be damaged, corrupted or is too large) requires a reference file! A reference file is a JPEG that was shot with the same camera + settings (quality, size and orientation). If resulting repaired file looks somewhat like this (somewhat recognizable but still distorted with recognizable pattern) then you selected a sample with the wrong orientation or resolution:

In that case try a different reference file from same camera or if not available try: https://www.disktuna.com/jpeg-visual-corruption/

  1. Double click “jpgrepair.exe”. There is no setup, just a single executable file.
  2. Open the folder button and Select the corrupt photos.
  3. Select the reference file.
  4. Click “Repair”.

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.)

It’s obvious when the software (Windows Photo Viewer) tried to parse such a file starting with file header, it will immediately run into trouble. it will respond with it’s catch all corrupt header error message “Windows Photo Viewer can’t open this picture because the file appears to be damaged, corrupted or is too large.”

You can check this using a hex editor like HxD.

If the file however contains data, you can try repairing the corrupt JPEG.

Not repaired ..

You can watch the value for Entropy and the byte histogram to see if this is caused by an empty file (zeros) or a file filled with a byte pattern. These are the two most common issues causing a file to be beyond repair.

Healthy entropy and histogram

File filled with pattern(FF)

A zero filled file

Other format, only half byte values used

Other format, text file probably

Entropy looks good but repair is unsuccessful?

Note that good entropy does not mean by definition JPEG. You may get similar entropy when the file is filled with other compressed data. However there a few things you can try (and that worked for me in the past sometimes):

  1. Run Extract JPEG option on JPEGs. I have had success using this method getting full and partial (but still usable) images from incorrectly recovered photos. Procedure is the same as for extracting JPEG from RAW (see video, procedure for extracting JPEG from JPEG is identical).
  2. Use Patch + Append option. This requires a sample or reference file that was shot with the same camera and settings (such as quality).

If extracting JPEG from the corrupted files yields no results then the file contains no complete JPEG file(s). However, since entropy is good there is still a chance there is encoded JPEG data within the file that can be reconstructed. To find out you have to examine the files one by one (no batch).

Advanced repairs using JPEG-Repair Toolkit

This is an advanced repair that requires manual input. You will also need a sample / reference file that is taken with the same camera + settings. You need to rename the reference file to sample.jpg and place it in the same folder as the file you want to repair.

Carve JPEG data from file and append valid JPEG header
  1. Double click “jpgrepair.exe”. There is no setup, just a single executable file.
  2. Click folder button.
  3. Select the corrupt file you need to repair.
  4. Select reference file.
  5. Click “Repair”. It is very likely that JPEG-Repair will prompt you to load a file it has made modifications to. It may take several iterations to get it right. Just keep following the messages JPEG-Repair displays. It may prompt to load files several times.
  6. It is likely the image is severely distorted. You will need to remove obvious corrupted data until a recognizable image is achieved.
  7. It is very likely the resulting image will need further processing using a photo editor.
  8. It is strongly advised to watch following video that will show you what to expect:

Repair a JPEG header 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.

File appears to be damaged, corrupted or is too large - repair 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).

 

22 thoughts on “Windows Photo Viewer: 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
  4. Filippo

    I have intact working pictures with corrupted ones, the problem is that the corrupted images don’t have any information in the details section. So i think the tool won’t find a relation between them despite the fact tha they were shot with the same camera successively. You can download them here: https://ufile.io/scyh7
    Password: ************. I’ll appreciate it very much if you help me.

    Reply
    1. Joep Post author

      Yeah, it’s binary blob with nothing to go on, no valid JPEG markers at all. I need something to orient within the corrupt file. Also, even we assumed the binary data was in fact image data, it’s full of invalid markers.

      I can get rid of those and you will get an image you can open and view, but it is a big mess, or what we also like to call FUBAR.

      https://www.disktuna.com/wp-content/uploads/2018/10/test2.jpg

      Reply
  5. sandra

    when i checked it on the internet it does not contain any hex codes what does it mean

    Reply
  6. Lucy

    But is it possible to know where the source problem comes from? You see, I can’t open any JPG file from my cellphone connected via USB to my computer, neither I can copy them to the computer. It’s very serious. The files from the computer can be opened just by using Picasa but not Windows Photo Viewer. What should be done then?

    Reply
  7. Random video chat

    Nice blog, it’s so knowledgeable, informative, and good looking site. I appreciate your hard work. Good job. Thank you for this wonderful sharing with us. Keep Sharing.

    Reply
  8. TV Repair

    It’s so knowledgeable, informative, and good looking site. Good job. Thank you for this wonderful sharing with us. Keep Sharing. And if you looking for a TV Repair service in Dubai you visit our services.

    Reply
  9. SEO Services in Canada

    Thanks for sharing a piece of great news, it’s really helpful for me and I want more this type of article, I also bookmarked this page for your future update.

    Reply
  10. Best Free Dating Apps

    Quality blog comments on the blog are something great to add real value to the existing content of the site and you have shared amazing guideline to boost the blog comments event without doing a lot of efforts.
    Thanks for sharing.

    Reply

Leave a Reply

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