Skip to content
Bytevive

Half your photo is gray? How to fix a corrupted JPEG or PNG

Why a damaged JPEG turns gray from one line down, what a repair tool can really fix, and how Repairit, EaseUS, Stellar, jpeg.repair, and Bytevive compare free.

By the Bytevive team9 min read

A phone at a seaside café showing a family photo that turns solid gray halfway down

The top of the photo looks perfect. Then, at one exact row, it turns into a flat gray slab all the way to the bottom. Or the picture won’t open at all and your viewer says the file is damaged, corrupted, or “not a valid image”.

Both are common, and both have plain causes. Knowing which one you have tells you whether a repair can bring the photo back, or only save the part that survived. For a broader guide covering every photo symptom, see how to fix corrupted photos.

Why half the photo turns gray

A JPEG starts with a start-of-image marker (FF D8), followed by settings such as the camera’s EXIF data and the compression tables, then the compressed picture itself, and finally an end-of-image marker (FF D9). These codes are defined in the JPEG standard, ITU-T T.81. The picture data is stored in strips from the top of the image to the bottom. You can test how start and end markers behave in our interactive JPEG walkthrough.

Inside a JPEG file

The picture is stored top to bottom, so losing the end of the file means losing the bottom of the photo.

  1. FF D8Start
  2. EXIFCamera info
  3. TablesHow to decode
  4. Image dataTop rows → bottom rows
  5. FF D9End
First byteCopy or save stops hereLast byte

Copy or save stops here: everything after about 68% of the file is missing, which takes out Image data, FF D9.

Not to scale. Everything to the right of the cut is missing, so the bottom third of the picture can't be drawn.

When a photo is cut off by a failing memory card, an interrupted transfer, or a full disk, the decoder runs out of data partway down. libjpeg-turbo, the library behind most image viewers and browsers, then raises its “Premature end of JPEG file” warning and, in the words of its own source code, leaves the rest set to zeros so that it returns “uniform gray for the remainder”. That’s the gray slab. It’s not a color fault you can correct; it’s where your data stops.

What a photo repair can genuinely fix

ProblemSymptomCan it be fixed?
Wrong file extensionA HEIC, PNG, or WebP named .jpg won’t open in some appsYes, completely. Rename it to its real type
Junk bytes before the image“Not a valid image”, though the size looks rightYes, completely
Missing end markerSome apps refuse it, others open it fineYes, completely
PNG checksum errors“CRC error” or a blank imageOften. The data is usually fine; the checksums aren’t
File cut offGray or missing bottom sectionPartly. The top is saved; the rest is gone
Data overwrittenShifted colors, stripes, scrambled blocksRarely without a header from the same camera

PNG and GIF have their own versions of these problems. The PNG specification gives every chunk of the file a CRC-32 checksum and requires a closing IEND chunk; the GIF89a specification ends every file with a single byte, 0x3B. When those are wrong or missing, strict viewers give up, even though the picture is intact.

Photo repair tools, compared

ToolWhere it runsFree allowancePaidWorth knowing
ByteviveIn your browser, nothing uploadedUp to 256 MB, free accountNoneReports how much of the picture survived
Wondershare Repairit OnlineTheir servers3 photos in total, 5 MB eachUS$5.99 per photo or US$9.99/monthMixes repair with AI enhancement
EaseUS Fixo OnlineTheir serversUnder 100 MB; email required to downloadPro planDownload code sent by email
Stellar Repair for Photo (online)Their servers1 photo up to 20 MBFrom US$9.99/monthDesktop app from US$39.99/year
jpeg.repairTheir serversFree, no sign-upNoneJPEG only; re-encodes the image
pngcheck, jpeginfo, JPEGsnoopYour computerFree, open sourceNoneDiagnose rather than repair

Largest photo you can repair for free online

Per file, on each service's free tier.

Bytevive
256 MB
Runs in your browser
EaseUS Fixo Online
100 MB
Email required
Stellar (online)
20 MB
1 photo
Repairit Online
5 MB
3 photos in total
Sources: each provider's tool or pricing page, checked November 2026.

To be fair to the others: jpeg.repair is free and refreshingly honest that missing data “can’t be invented”, and the paid desktop apps can do things a browser tool can’t, such as borrowing the header from a healthy photo taken on the same camera. If your photos have scrambled colors rather than a gray band, that’s the kind of tool you need.

How to fix a photo in your browser with Bytevive

  1. Open Photo Repair and sign in with a free account.
  2. Drop the photo onto the page. It never leaves your device.
  3. Bytevive reads the first bytes to work out what the file really is. It repairs JPEG, PNG, and GIF wrappers, identifies and checks WebP, BMP, and AVIF (up to 256 MB), and flags HEIC or TIFF as unsupported rather than guessing. A photo that opens on a phone and not on Windows is often a HEIC file.
  4. It strips stray bytes, fixes a wrong extension, adds a missing end marker, and checks every PNG chunk’s checksum, rebuilding the file if they’re wrong.
  5. It decodes the result and shows it to you. If the file was cut off, your browser shows what’s left with an estimate of how much is still there, though stricter apps may still refuse a cut-off file.

The command-line route

# List every PNG chunk and check its CRC
pngcheck -v photo.png

# Fully decode a JPEG and report errors (exit code 1 if damaged)
jpeginfo -c photo.jpg

Both are free and open source. They won’t fix anything, but they’ll tell you precisely what’s wrong, which is half the battle. JPEGsnoop goes further on Windows, decoding a file block by block.

The bottom line

Many broken photos are only mislabeled or missing a few bytes at the edges, and those come back completely. A photo with a gray band can’t be made whole, but the part above the line is yours to keep. Check it in your browser to find out which you have, before uploading a personal photo anywhere. If Windows Photos says it doesn’t support the file format at all, see our guide to that message.

Frequently asked questions

Why is the bottom half of my photo gray?
The file ends early. A JPEG stores the picture from top to bottom, and when the data runs out the decoder fills the rest with zeros, which display as flat gray. Everything above the gray line is real; everything below it was never saved or copied.
Can AI repair the gray part of a photo?
AI tools can paint something plausible into the missing area, but it's invented, not recovered. If the photo matters as a record, such as evidence, a document, or a family moment, keep the honest partial version and treat any filled-in copy as an illustration.
My photo won't open on Windows but works on my phone. Is it corrupted?
Probably not. iPhones save HEIC photos by default, and some copies end up with a .jpg name or on a PC without HEIC support. A repair tool that checks the real format will tell you what the file actually is.
Is my photo uploaded when I use Bytevive?
No. The check and the repair run inside your browser tab, free with a free account for files up to 256 MB. The photo isn't sent to Bytevive or anyone else, which is also why there's no tiny upload limit.
Does Bytevive repair HEIC or camera RAW photos?
Not yet. Bytevive detects HEIC and TIFF from their file signatures and flags them as unsupported rather than guessing, and it doesn't cover camera RAW formats. It repairs JPEG, PNG, and GIF wrappers and checks WebP, BMP, and AVIF files up to 256 MB.

Sources

Every claim, error message, price, and limit cited above comes from these pages, checked on November 22, 2026. If one has changed, tell us at support@bytevive.com and we’ll update the article.

  1. ITU-T T.81: the JPEG standard (marker codes)
  2. libjpeg-turbo source: jdhuff.c ("uniform gray" fill)
  3. libjpeg-turbo source: jdatasrc.c ("Premature end of JPEG file")
  4. W3C: PNG specification (chunks and CRC)
  5. W3C: GIF89a specification (trailer)
  6. Wondershare Repairit Online Photo Repair
  7. Wondershare Repairit online store (limits and prices)
  8. EaseUS Fixo Online Photo Repair
  9. Stellar Repair for Photo, online
  10. jpeg.repair
  11. pngcheck
  12. jpeginfo
  13. JPEGsnoop

Photo won't open? Find out how much survived.

Free account, photos up to 256 MB. The picture never leaves your device.

Repair a photo, free

Other free tools: video, PDF, photo, Office, ZIP, and audio repair.