Corrupt JPG file – digital photo with damaged pixel blocks from the error position onwards

Repairing Corrupt JPEG/JPG Files – Images Damaged, Grey or Cut Off

Damaged JPEG files show grey areas, wrong colours or only the upper half of the picture – or the image viewer no longer opens the file at all. Whether the images can be repaired depends on why the image files are corrupt: often the fault is not in the files, but on the hard drive or memory card behind them. We explain how repairing JPG images really works, what software, programs and repair tools can achieve, and when you are better off having photos restored by data recovery directly from the storage medium.

How to Recognise Damaged JPEG Images

Corrupt JPG photo with colour stripes and shifted blocks – typical fault pattern of a damaged image file

Corrupt JPGs show very different symptoms depending on the type of damage – on a PC as well as a Mac. The fault patterns users describe to us most often:

  • Grey or single-coloured area in the lower half – the picture is cut off from a certain line onwards, the rest is missing.
  • Greyed-out or completely black images, although the file size looks normal.
  • Wrong colours, colour stripes or shifted blocks – the subject is recognisable but distorted.
  • “The file cannot be opened”: the image viewer, Photoshop or another image editing program reports an error or an unknown file format.
  • Preview present, full image broken: in Explorer the photo looks normal, but opening it shows only pixel garbage.
  • File size 0 KB – the content of the file is missing entirely.
The last symptom is a special case: an empty file cannot be repaired, because there is nothing to repair – only the paths of data recovery from the drive can help here.

How a JPG File Is Structured – and What Breaks

To understand which repair is possible, it helps to look inside the file format – JPEG is by far the most important of the compressed image formats. Every JPEG file consists of three parts:

  1. Header with metadata: resolution, colour profile, the camera's EXIF data – and usually an embedded miniature preview image. That is why the preview in Explorer can look intact although the actual image data is destroyed.
  2. Compressed image data: the picture is stored in 8×8-pixel blocks and Huffman-encoded. Decoding runs strictly sequentially from top to bottom – a single damaged byte therefore makes everything from that point on unreadable. This is exactly how the typical half images with a grey area come about.
  3. End marker: if it is missing, some programs abort opening the file, others display the image anyway.
From this follows the most important rule of photo repair: a damaged header can be repaired – missing image data cannot be conjured up. If the lower half is grey, that data simply does not exist in the file. No repair tool in the world can restore content that is not there; the question then is whether the complete data still exists somewhere on the storage device.

The Most Common Reasons for Corrupt Image Files

USB stick and memory card on the lab bench

Damaged photos are almost always a symptom – the actual cause lies one level deeper, on the device or the drive:

  • Interrupted transfer or saving: camera switched off while writing, USB stick pulled too early, crash while copying – the file was never written completely.
  • Bad sectors on the hard drive or SD card: if parts of the file sit on unreadable sectors, exactly these blocks are missing when the file is opened. Often many images in the same folder are then affected.
  • File system errors: after a crash, entries in the file system point to wrong areas of the partition – the file suddenly contains foreign content. If the whole drive shows problems, our article on the RAW file system helps.
  • Failed recovery: the most common case in our lab. Deleted photos or an accidentally formatted SD card were rescued on the computer with recovery software – but half of the restored images are broken. The reason: signature-based data recovery software cannot reassemble fragmented files correctly and saves fragments as JPGs.
  • Flash memory wear: ageing NAND cells in memory cards and USB sticks flip individual bits – gradually more and more photos become unreadable.
  • Fake memory cards: cards with counterfeit capacity overwrite old data beyond a certain fill level – the oldest images are then destroyed.

Many corrupt images at once are an alarm signal. If entire folders full of photos are suddenly damaged, it is most likely the storage medium that is dying – not the files. Do not start any repair attempts on the drive now; clarify the cause first and secure the data. The right immediate steps: first-aid measures for data loss.

Professionelle Diagnose – kein Risiko

Wir analysieren Ihren Datenträger im Labor. Kosten entstehen nur bei erfolgreicher Datenrettung.

First Aid: Create a Copy, Then Test

Before you try any tool, the basic rule of every file repair applies – never work on the original:

  1. Create a copy of the corrupt files – into a folder at a different location, for example on a second drive under Windows. All further steps happen only on the copy.
  2. Use several programs. Image viewers differ in tolerance: what the Windows photo viewer cannot open is often at least partially displayed by a browser, other operating systems (macOS, Linux) or an image editing program.
  3. Try converting. Opening and re-saving in another of the common image formats (PNG, TIFF, BMP or GIF) sometimes rescues a partially readable picture – the displayed image data is written anew, error-free, to a different location.
  4. Check for the embedded preview. The miniature image can be extracted from the header – small, but better than nothing when a single important photo is at stake.
  5. Compare file sizes. If many corrupt JPGs have exactly the same size or 0 KB, this points to a storage or recovery problem – then repair attempts on the files are not worthwhile. In that case, follow the solutions in the section after next.

Symptom, Cause, Chances: the Overview

SymptomLikely causeRepair possible?
Lower half grey / picture cut offFile incomplete (transfer aborted or restored fragmented)Only if the complete data still exists on the storage device – a case for data recovery
File does not open, size normalDamaged headerGood chances – the header can be reconstructed with a reference file from the same camera
Colour stripes, shifted blocksIndividual bit errors in the image dataPartially – the picture remains disturbed from the error onwards
Preview OK, full image brokenImage data destroyed, header intactOnly the miniature can be extracted; the original may be recoverable from the drive
All images in one folder corruptBad sectors, dying storage deviceDo not repair the files – have the storage device read out professionally
0 KB filesOnly the directory entry remainsNo file repair possible – data recovery from the storage medium

What Repair Software and Online Tools Can Really Do

For JPEG repair there are countless programs, online services and repair software downloads – from the simple click-through assistant (“wizard”) to the photo repair tool with detailed instructions. Realistically, all these solutions can do exactly three things – the file format technically allows no more:

  • Header repair: a destroyed file header is replaced with that of an intact reference file – ideally from the same digital camera or device with the same resolution. This is the only method of repair software with genuinely good results.
  • Re-decoding with error tolerance: the tool skips damaged areas and displays what is readable. Result: half the picture – just without an error message.
  • Extraction of the embedded preview: delivers a small substitute image.
What no repair or recovery program can do, whichever you download and use: invent missing image data. If individual providers promise to “fully restore cut-off images”, scepticism is warranted – reputable tools honestly show in a preview what can be reconstructed before you pay anything. With online services, privacy is an additional concern: your private photos are uploaded to third-party servers – not a good idea for sensitive pictures and documents. And beware of guides that additionally have data recovery software installed on the affected PC: that endangers the originals.

A special case are signature-based tools like PhotoRec: they restore deleted images from the drive based on their file signatures – but with fragmented files this produces exactly the half-grey JPGs this article is about. The same applies to other photo file formats: RAW files from the camera and PSD files from Photoshop also frequently come back damaged from such rescues. Anyone who ends up with masses of corrupt photos after a recovery should therefore not repair the files, but have the rescue repeated from the original storage device – this time with correct handling of the fragmentation.

When the Storage Device Is the Cause: Data Recovery Instead of Photo Repair

Diagnosis of a storage device in the data recovery lab

If the image files are corrupt because the storage medium is failing, the order is reversed: first the storage device is secured, then intact files are created from it. In the lab this works as follows:

  1. Diagnosis of the storage device – hard drive, SSD, USB stick or memory card are checked; bad sectors and controller problems are identified.
  2. Write-protected sector image – even from partially unreadable areas, everything that is physically still readable is extracted.
  3. Reconstruction at file system level – instead of blind signature search, the original directories, file names and the actual location of all fragments are evaluated. This produces complete photos instead of halves – for JPG as well as PNG, TIFF, BMP, GIF or PSD; without converting to other formats.
  4. Verification of the results – you receive a file list in advance and see which images have been fully restored.
The difference from pure file repair: data recovery works with all the information on the drive and the partition – and thereby also retrieves the data that is missing from the single corrupt file, instead of restoring mere remnants. The analysis is non-binding, you receive a fixed-price quote, and costs are only incurred on success.

FAQ: Frequently Asked Questions About JPEG Repair

Three answers we give most often on the phone. What a photo looks like whose image data is damaged from the error position onwards is shown by the article image at the very top: the upper part is intact, below it the corrupt blocks begin.

Can the grey half of a picture be restored?
Not from the file itself – the data is simply missing there. However, the complete version often still exists on the original storage device and can be rescued by professional data recovery. The less has been written to the drive since, the better the chances.

Are free repair tools and online photo repair a safe solution?
Technically they do no harm as long as you work exclusively with copies and install or save nothing on the affected storage device. With online services, bear in mind that your photos are uploaded to third-party servers. And: never pay for a promise without an honest preview of the result.

Why are so many photos corrupt after a data recovery?
Because simple recovery software only recognises files by their signatures during the recovery process and assembles fragments in the wrong order. The problem is not your images but the method – a renewed, professional rescue from the original storage medium delivers the complete files in many cases.

Prevention: So That Images Do Not Get Damaged in the First Place

  • Never remove the memory card while the access indicator is lit and switch the camera off before changing cards.
  • Back up photos after every occasion – a backup on two separate storage media protects better than any later repair, no matter on which device the error happens. Backups cost minutes, repairs cost days. More on this: Preventing data loss.
  • Replace full and old cards before wear costs you pictures – the typical warning signs often creep up gradually.

Conclusion

Corrupt JPEG files are, in two out of three cases, not a file problem but a storage device problem – the damage occurs on the way between camera, memory card and computer. Header damage can be fixed well with reference files – grey halves, mass corruption and 0 KB files, however, never through file repair, only through rescue from the original drive. Work exclusively with copies, and if several images are affected, clarify the condition of the storage medium first.

Our experts will gladly assess your case: 0800-881 12 25 (free of charge, around the clock) or via the online cost estimate.

Jan Bindig and Lars Müller - Datenrettungsspezialist.de

Do you have a problem with your storage device?

The team at Datenrettungsspezialist.de, led by Jan Bindig and Lars Müller, is at your side – free initial consultation, no obligation.

Call Message