When a PNG file is missing its IEND chunk, the file is incomplete. You may see a "png unexpected end of file" error, or the image may appear only partially loaded or not at all. The main search phrase for this issue is png missing iend chunk, and the question is always: how much of the picture can you get back? The answer depends on whether the image is interlaced or not. In many cases a large part of the image can be rebuilt.

What a Complete PNG Looks Like

A valid PNG file ends with a specific 12-byte sequence called the IEND chunk. That sequence is: 00 00 00 00 49 45 4E 44 AE 42 60 82. If those bytes are missing, the file is incomplete. The IEND chunk is the marker that tells a viewer the file is whole. Without it, many image viewers will refuse to display anything at all, even if most of the image data is present.

Why PNGs Get Cut Short

A missing IEND usually means the file was cut short by an interrupted download, copy, or save. Common causes: a network failure mid-download, a USB drive removed too early, or a crash while saving. The result is a truncated png file that stops somewhere inside the image data. Because the PNG format stores pixel rows in order from top to bottom, the part of the file that was saved still contains the upper rows of the image.

How Viewers React to an Incomplete PNG

Many viewers refuse a PNG without IEND or with an incomplete IDAT stream. Instead of showing the rows that are present, they may show a blank area, an error message, or nothing at all. This is why a png image partially loaded in one program might look completely broken in another. The file itself is not corrupted in the sense of bad data. It is simply unfinished.

What a Rebuild Can Return

Non-interlaced Images

Rebuilding decodes the rows that exist and writes a valid PNG. The missing rows cannot be recreated because there is no information about them in the file. For a non-interlaced PNG, pixel rows are compressed in order from top to bottom. A cut-off file still holds the upper rows. The rebuild returns those rows as a complete image from the top down to where the file was cut off. The bottom portion will be missing.

Interlaced Images (Adam7)

Interlaced PNGs store the image in 7 passes. A cut-off interlaced file may contain a low-detail version of the whole image, because the early passes cover the full area at reduced resolution. The rebuild can produce a blurry but full-frame picture.

Recognizing an Incomplete PNG

Check the file size. If the file is suspiciously small compared to the expected dimensions, or if it fails to open in your usual image viewer, the file is likely cut off. Other signs include a half png image recovery scenario where the top part of the image appears and the rest is grey or missing. When you see a "png unexpected end of file" error, stop. The file is incomplete.

What a Rebuild Tool Does

Use a rebuild tool. It performs these steps:

  1. Scans the file for the PNG signature and chunk headers.
  2. Reads the IDAT chunks that are present and decompresses the pixel data they contain.
  3. Assembles the decompressed rows into a raw image buffer, stopping at the last complete row.
  4. Writes a new PNG file with the correct headers, the recovered rows, and a fresh IEND chunk.

The missing rows cannot be recreated. The output image will have the same width as the original but a shorter height. For interlaced files, you get a full-size image at lower detail. Upload your file to png.repair to handle this process.

What You Cannot Get Back

No amount of rebuilding can recover pixel data that was never saved. If the file was cut off after only a few rows were written, you will get those rows back. The rest is gone. If the cut happened in the middle of a compressed row, that row may be lost entirely, skipping a line or two. The rebuild stops at the last complete row that can be fully decoded.

Interlaced vs Non-interlaced Summary

For a non-interlaced image, a rebuild returns the top portion of the picture. For an interlaced image, a rebuild may return a lower-resolution version of the whole picture. In both cases, the data that was saved is used as fully as possible.