Manatee

JPEG shows half grey: can a corrupted photo be repaired?

A JPEG that shows a clean top half and solid grey below it has been cut short: the decoder ran out of data at the line where the grey starts, and the bottom half was never written to your disk. No tool can reconstruct pixels that do not exist, so the realistic options are finding another copy, extracting the embedded thumbnail, or keeping the half that survived. A JPEG that shows the whole image with a color shift or a smeared band is a different, milder problem and is often fixable.

What the grey block tells you

JPEG stores the image in a single stream of compressed blocks, in order from the top left to the bottom right. When a viewer hits the end of the file before it reaches the last block, it fills the rest with a neutral color, usually grey. So the grey line is a precise marker: everything above it exists, everything below it does not.

Check the file size to confirm. Press Command+I on the photo. A 12-megapixel photo from a phone is usually two to five megabytes. A file that shows 900 KB and renders half an image has been truncated, and the missing bytes are on whatever device or service it came from, not on your Mac.

Compare with the two other common symptoms, because the fixes differ:

  • Color shift from a certain line down (the image continues but in wrong colors, or shifted sideways). A few bytes in the middle were damaged or dropped. The data after the damage is present but decoded out of step. Partly fixable.
  • Smeared horizontal band with the image continuing normally below it. One damaged block. The rest of the file is fine. Mostly cosmetic.
  • Grey from a line down to the bottom. Truncation. Not fixable from this file alone.

Step 1: look for another copy before anything else

The best repair for a truncated photo is a complete one, and there are more copies around than people expect.

  1. The phone or camera. If the photo came from an iPhone, open Photos on the phone and check. If it came from a camera, the SD card still has it unless it was formatted.
  2. iCloud Photos, Google Photos or any cloud sync. Open the web version and download the original again.
  3. The sender. If it arrived by email or a chat app, ask for it again, ideally by AirDrop or as a file attachment rather than an inline image.
  4. Time Machine. Open the folder in Finder, enter Time Machine, and step back to a date before the damage.
  5. Mail. Search your Sent folder and any previous conversation for the filename.

If you find a full copy, you are done. If the transfer that truncated the file is repeatable (the same cloud folder, the same cable), see file transfer interrupted: how to salvage a half-copied video; the causes are the same for photos.

Step 2: try the other decoders on your Mac

Decoders disagree about how strict to be. If the damage is a bad block or a color shift rather than truncation, one of these may render a usable image.

  1. Preview (the default). If it shows grey, try the rest.
  2. Quick Look: select the file in Finder and press Space.
  3. Photos: drag the file onto the Photos icon in the Dock.
  4. A browser: drag the file into a Safari, Chrome or Firefox window. Browser decoders are built for damaged files from the web and are often the most tolerant.

If any of them shows more of the image, take a screenshot or export from that app and keep the result.

Step 3: extract the embedded thumbnail

Nearly every camera and phone JPEG carries a reduced-size preview inside its EXIF metadata, stored at the very start of the file. Because it comes first, it survives truncation. It is typically 160 by 120 pixels from a camera or a few hundred pixels wide from a phone: not a print, but a complete picture.

Metadata tools can pull it out. With exiftool, a free command-line tool many Mac users already have:

exiftool -b -ThumbnailImage ~/Desktop/IMG_2201.jpg > ~/Desktop/IMG_2201-thumb.jpg

Some cameras also embed a larger preview under a PreviewImage tag; the same command with -PreviewImage retrieves it when present. If the tool reports nothing, the file had no embedded preview or the truncation happened before the metadata ended.

Step 4: repair a color shift or a bad block

If the image continues below the damage but in wrong colors, the bytes after the fault are intact and merely misaligned. Opening the file in an image editor and re-saving it sometimes snaps the decoder back into step; the damaged band stays, but the region below it returns to normal. Some editors dedicated to photo repair can also re-synchronize the stream by hand, at the cost of learning their tools.

A single smeared band is usually best handled by cloning over it in any editor that has a healing or clone tool. The band is typically 8 or 16 pixels tall and the rest of the image is fine.

What a repair tool can and cannot do here

This is where honesty matters. Manatee repairs corrupted video, PDF and Word documents; it does not repair JPEG or other images, and its Convert mode will not fill in pixels that were never written. If a truncated JPEG is the only copy you have, Manatee is not the answer, and neither is any tool that claims to rebuild the missing half. What is recoverable from a truncated JPEG is exactly what Steps 2 and 3 above describe: the part that rendered, and the thumbnail.

For the general principle behind this, see why files get corrupted and what can actually be recovered.

Step 5: keep the half that survived

If there is no other copy, the top half is still the photo. Open the file in Preview, select the good region with the rectangle tool, choose Tools, Crop, and save as a new file. A well-framed crop of half a photo is often more than you expect, especially for landscapes and group shots where the subject sits in the upper portion.

Preventing it

Truncated JPEGs almost always come from an interrupted transfer: a card reader unplugged early, a phone disconnected while importing, a cloud folder moved before sync finished, or a messaging app that gave up on a large attachment. Import with a cable or AirDrop, wait for the import to finish before ejecting, and keep the originals on the card or phone until you have opened the copies on the Mac.

Questions

The photo was fine last week and shows grey now. Did my drive corrupt it? Possibly, if nothing was transferred in between. A file that changes on its own suggests a drive or a sync client overwrote it. Check the file’s Modified date in Get Info, look for a full copy in cloud version history or Time Machine, and run First Aid on the drive in Disk Utility if other files are also changing.

Can the grey half be restored by an AI or an online repair service? An AI tool can invent plausible pixels to fill the space, which may be fine for a decorative image and is unacceptable for a record of a real event. An online service cannot recover data that is not in the file, whatever the upload page says. Treat any promise of full recovery from a truncated JPEG with suspicion.

The JPEG opens on my phone but shows grey on the Mac. Which is right? The phone. It has the complete file; the Mac copy is truncated. Send it again, preferably by AirDrop, and compare the sizes.

Does converting the damaged JPEG to PNG help? No. Conversion re-encodes whatever the decoder could read, so a half-grey JPEG becomes a half-grey PNG.