pngcheck

pngcheck verifies the integrity of PNG, JNG and MNG files (by checking the internal 32-bit CRCs [checksums] and decompressing the image data); it can optionally dump almost all of the chunk-level information in the image in human-readable form. For example, it can be used to print the basic statistics about an image (dimensions, bit depth, etc.); to list the color and transparency info in its palette (assuming it has one); or to extract the embedded text annotations. This is a command-line program with batch capabilities.

Here's some sample output (screen shots, eh?):

    % pngcheck -vt ArcTriomphe-iCCP-red-blue-swap.png
    File: ArcTriomphe-iCCP-red-blue-swap.png (5171 bytes)
      chunk IHDR at offset 0x0000c, length 13
        64 x 64 image, 8-bit colormap, non-interlaced
      chunk iCCP at offset 0x00025, length 461
        profile name = Swapped red & blue channel
        compression method = 0 (deflate), compressed profile = 433 bytes
      chunk PLTE at offset 0x001fe, length 759: 253 palette entries
      chunk IDAT at offset 0x00501, length 3616
        zlib: deflated, 32K window, default compression
      chunk tEXt at offset 0x0132d, length 68, keyword: Title
        PNG color-correction test image, swapped red and blue channels
      chunk tEXt at offset 0x0137d, length 143, keyword: Copyright
        Copyright 2005 Greg Roelofs. Licensed under Creative Commons
        AttributionNonCommercial, http://creativecommons.org/licenses/by-nc/2.5/
      chunk tIME at offset 0x01418, length 7: 16 Aug 2005 07:07:07 GMT
      chunk IEND at offset 0x0142b, length 0
    No errors detected in ArcTriomphe-iCCP-red-blue-swap.png (8 chunks, -26.2% compression).

    % pngcheck *.png
    OK: 000000.png (48x48, 1-bit grayscale, non-interlaced, 71.2%).
    OK: 000033.png (48x48, 1-bit colormap, non-interlaced, 66.0%).
    OK: 000066.png (48x48, 1-bit colormap, non-interlaced, 66.0%).
    OK: 000099.png (48x48, 1-bit colormap, non-interlaced, 66.0%).
     [...]
    OK: ffff66.png (48x48, 1-bit colormap, non-interlaced, 66.0%).
    OK: ffff99.png (48x48, 1-bit colormap, non-interlaced, 66.0%).
    OK: ffffcc.png (48x48, 1-bit colormap, non-interlaced, 66.0%).
    OK: ffffff.png (48x48, 1-bit grayscale, non-interlaced, 70.1%).

    No errors were detected in the 216 files tested.

The current release supports all PNG, MNG and JNG chunks, including the newly approved sTER stereo-layout chunk. It correctly reports errors in all but two of the images in Chris Nokleberg's brokensuite-20061204. Also included (since version 2.1.0) are two helper utilities:

The new utilities are licensed under the GNU General Public License (GPL); pngcheck itself remains under its original, MIT/X11-style license.

Current version: 2.3.0
Authors: Alexander Lehmann, Andreas Dilger, Greg Roelofs
License: Open Source
Platforms: Unix, DOS, OS/2, Windows, Macintosh, Amiga, etc.
README: local web site
http://www.libpng.org/pub/png/src/
ftp://ftp.simplesystems.org/pub/libpng/png/applications/
ChangeLog: local web site
http://www.libpng.org/pub/png/src/
ftp://ftp.simplesystems.org/pub/libpng/png/applications/
Binaries:
operating system
platform
version
Linux (.rpm)
Linux (.zip)
Linux (.zip)
Win32 (.zip)

Linux (.rpm)
FreeBSD (.tbz)

Linux (.deb)
Linux (.zip)
Solaris (.zip)
Irix 6.x (.zip)
HP-UX
Amiga
SCO OpenServer 5
Mac OS X 10.2
RISC OS

many
x86
x86
x86

x86, x86-64
x86

many
x86/libc5
SPARC
MIPS
PA-RISC
68k
x86
PPC
ARM

 2.3.0-
 2.3.0
 2.3.0
 2.3.0

 2.2.0-
 2.2.0

 2.0.0-
 1.99.3
 1.99.3
 1.99.3
 1.99.3
 1.99.3
 1.99.3
 1.99.3
 1.99.3


(most of these are "unofficial" binaries compiled by third parties)
Source code: http://prdownloads.sourceforge.net/ (.tar.gz)
http://prdownloads.sourceforge.net/ (.zip)
ftp://ftp.simplesystems.org/pub/libpng/png/applications/ (.tar.gz)
ftp://ftp.simplesystems.org/pub/libpng/png/applications/ (.zip)
Supporting libraries: zlib
Related software: pngmeta - PNG meta-information extractor



[primary site hosted by SourceForge.net] Last modified 12 July 2007.

Copyright © 2000-2007 Greg Roelofs.