keepcalculator

06 Numbers and Powers

Repair Corrupted Photos: What Works & What Doesn’t

Card No. 06·80510 · Updated · Standard formula, shown below

Yes, corrupted photos can often be repaired, but the success rate depends entirely on the type and extent of the damage. You can fix a photo with a minor header error or a few bad bytes using free tools, while a severely truncated or overwritten file may be unrecoverable without a professional service. This article explains the common causes of photo corruption, the repair methods that actually work, and how to choose the right approach for your situation.

What Causes Photo Corruption?

Photo files are structured data. A JPEG, for example, contains a header (metadata), compressed image data, and a footer (end marker). Corruption happens when any part of this structure is altered or lost. Common causes include:

  • Interrupted writes: Removing an SD card or USB drive while the camera or computer is still writing, or a power failure during save.
  • Bad sectors: Physical damage or age-related degradation on a hard drive or memory card, making certain areas unreadable.
  • Software bugs: A crash in an editing program or a faulty transfer utility can write incomplete data.
  • Malware or viruses: Some malicious software deliberately damages or encrypts image files.
  • File system errors: A corrupted file allocation table (FAT) or NTFS master file table can make files appear unreadable even if the data is intact.

The type of corruption matters. A logical error (bad header, missing footer) is often fixable. A physical error (bad sector) may require specialized hardware recovery, which is expensive and not guaranteed.

How Photo Repair Software Works

Most consumer photo repair tools use one of three strategies:

  1. Header/footer repair: The tool scans the file for known JPEG or PNG markers and rewrites a valid header or appends a missing end marker. This works when only the metadata is damaged.
  2. Data carving: The tool scans the entire storage device for raw image data (often identified by unique byte patterns) and reconstructs files from fragments, ignoring the damaged file system. This is useful when the file table is corrupted.
  3. Pixel interpolation: For images with small damaged areas (e.g., a few corrupted lines), the software fills in the gaps using surrounding pixels. This is more like a smart repair and can yield visually acceptable results.

No tool can recover data that was never written. If the camera lost power mid-write, the missing bytes simply don’t exist on the card. In that case, the best you can hope for is a partial image with the bottom cut off.

How to Choose a Repair Tool

Before paying for a tool, try these free methods in order:

  • Open in another viewer: Sometimes the file is fine, but a buggy viewer fails. Try opening it in a different app (e.g., Windows Photos, GIMP, or an online viewer).
  • Convert to another format: Use a free converter like XnConvert or IrfanView to re-save the image as PNG or TIFF. This can sometimes force a re-write of the header.
  • Use a dedicated free repair tool: Tools like JPEG-Repair (free for basic use) or Stellar Phoenix JPEG Repair (trial version) can fix common header errors.
  • Try a hex editor: For advanced users, opening the file in a hex editor and manually deleting corrupted bytes before the JPEG start marker (FFD8) can work.

If free tools fail, consider a paid tool like Disk Drill or PhotoRec (free but command-line based). Paid tools often have better data carving algorithms and a more user-friendly interface, but they are not magic. A 100% guarantee of recovery is a red flag.

Common Problems and Misconceptions

Misconception: “The file is 0 KB, so it’s gone.” A 0 KB file means the file system entry exists but points to no data. If the actual data was written elsewhere on the disk, a data carving tool might still find it. If the file was never written, it’s unrecoverable.

Misconception: “Renaming the extension fixes it.” Changing .jpg to .png does not change the internal data. The file will still open as a JPEG, and if the JPEG data is corrupt, renaming won’t help.

Common problem: “The image opens but is half gray.” This usually means the file is truncated – the write was interrupted. Some tools can stitch together a partial image, but the missing portion is gone.

Common problem: “Error reading file from SD card.” This often indicates a failing card, not a corrupt file. Stop using the card immediately, make a raw image backup (using dd on Linux or Win32DiskImager on Windows), and then attempt recovery on the backup.

Free vs. Paid Repair Tools

Free tools are excellent for logical errors. For example, JPEG-Repair can fix a missing footer in seconds. However, free tools often have limitations:

  • They may only handle one file at a time.
  • They may not support all formats (e.g., RAW files from specific camera brands).
  • They may not handle large files well.

Paid tools (like Stellar Repair for Photo, Wondershare Repairit) offer batch processing, support for many RAW formats, and more sophisticated data carving. They also include preview options so you can see if the repair worked before paying. For a single precious photo, the free route is worth trying first. For hundreds of images from a wedding shoot, a paid tool might save hours.

When to Use a Professional Service

Professional data recovery services are for physical damage – a clicking hard drive, a scratched disc, or a memory card that isn’t recognized at all. They use cleanroom facilities and specialized hardware to read raw data. Costs can range from hundreds to thousands of dollars, and success is not guaranteed. You should only consider this if:

  • The photos are irreplaceable and have high emotional or financial value.
  • The storage device is physically damaged.
  • You have already tried software recovery and it failed.

Do not attempt to open a physically damaged drive yourself; further attempts can make recovery impossible.

How to Prevent Future Corruption

Prevention is far easier than repair. Follow these habits:

  • Always eject storage devices properly. Wait for the OS to say it’s safe to remove.
  • Use high-quality memory cards from reputable brands, and replace them every few years.
  • Backup immediately. Copy photos to at least two separate locations (e.g., external drive and cloud) soon after shooting.
  • Check the card with a health tool (e.g., H2testw) before important shoots.
  • Use a UPS for your computer to prevent power-loss corruption.

Remember that no backup strategy is complete without testing that the backups actually open.

Frequently Asked Questions

Can I repair a corrupted photo on my phone? Yes, some mobile apps (like Photo Recovery for Android) can attempt basic repairs, but they are less powerful than desktop tools. For serious corruption, transfer the file to a computer and use a dedicated program.

Is it safe to use an online photo repair service? It is safe only if you trust the service with your photos. For private or sensitive images, use offline software. Online services may store or analyze your files.

Can I repair a RAW file the same way as JPEG? Not always. RAW files have proprietary formats (CR2, NEF, etc.) that require specific parsers. Some tools support common RAW formats, but you may need a brand-specific repair utility.

Why does my photo open but show a black screen? This often indicates that the image data is encrypted or the color profile is corrupted. Try converting the file to a standard format like PNG, or use a tool that can re-embed a default color profile.

Will repairing a photo reduce its quality? If the repair only fixes the header or footer, the image data is untouched and quality remains identical. If the tool uses pixel interpolation to fill damaged areas, there will be some quality loss in those regions, but the rest of the image is unchanged.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →