Print detailed information about and verify PNG, JNG, and MNG files.


Print a summary for an image (width, height, and color depth)

$ pngcheck [image.png]

Print information for an image with [c]olorized output
$ pngcheck -c [image.png]

Print [v]erbose information for an image
$ pngcheck -cvt [image.png]

Receive an image from stdin and display detailed information
$ cat [path/to/image.png] | pngcheck -cvt

[s]earch for PNGs within a specific file and display information about them
$ pngcheck -s [image.png]

Search for PNGs within another file and e[x]tract them
$ pngcheck -x [image.png]


pngcheck [-7cfpqtv] file.{png|jng|mng} ...

pngcheck [-7cfpqstvx] file-containing-PNGs ...

Can be used in a pipeline:

... | pngcheck [-7cfpqstvx]



Print contents of tEXt chunks, escape chars >=128 (for 7-bit terminals).


Colorize output (for ANSI terminals).


Force continuation even after major errors.


Display contents of PLTE, tRNS, hIST, sPLT and PPLT (can be used with -q).


Test quietly (only output errors).


Search for PNGs within another file.


Print contents of tEXt chunks (can be used with -q).


Test verbosely (print most chunk data).


Test very verbosely (decode and print line filters).


Suppress windowBits test (more-stringent compression check).


Search for PNGs within another file and extract them when found.


pngcheck is the official PNG tester and debugger. Originally designed simply to test the CRCs within a PNG image file (e.g., to check for ASCII rather than binary transfer), it has been extended to check and optionally print almost all the information about a PNG image and to verify that it conforms to the PNG specification. It also includes partial support for MNG animations.

It can dump the chunk-level information in the image in human-readable form. For example, it can be used to print the basic stats about an image (dimensions, bit depth, etc.); to list the color and transparency info in its palette; or to extract the embedded text annotations. All PNG and JNG chunks are supported, plus almost all MNG chunks (everything but PAST, DISC, tERm, DROP, DBYK, and ORDR). This is a command-line program with batch capabilities (e.g., pngcheck *.png).






Some PNG files generated through libpng versions 1.0.6 and 1.2.6 may have an invalid window-size field on the zlib header, causing pngcheck to fail, unless used with the -w (Suppress windowBits test) option.

In those cases, the png-fix-IDAT-windowsize utility provided by the pngcheck package can be used to correct the window-size field and compute a new CRC to match the corrected IDAT chunk. Other types of errors detected by pngcheck may require more specialized tools to fix, such as pngfix.


Program was written by Greg Roelofs <>, <>.

This manual page was written by Kevin M. Rosenberg <> for the Debian GNU system (but may be used by others). Updated and converted to Perl POD source format by Jari Aalto <>. Released under license GNU GPL v2 or (at your option) any later version. For more information about license, visit <>.


pngchunkdesc (1), pngchunks (1), pngcomp (1), pngcp (1), pngcrush (1), pngfix (1), pnginfo (1), pngmeta (1), pngnq (1), pngquant (1), pngsplit (1)

Copied to clipboard