% brew install pngcrush
% pngcrush -n -v hoge.png
| pngcrush 1.7.60
| Copyright (C) 1998-2002, 2006-2013 Glenn Randers-Pehrson
| Portions copyright (C) 2005 Greg Roelofs
| This is a free, open-source program. Permission is irrevocably
| granted to everyone to use this version of pngcrush without
| payment of any fee.
| Executable name is pngcrush
| It was built with libpng version 1.5.16, and is
| running with libpng version 1.5.16 - May 23, 2013
| Copyright (C) 1998-2004, 2006-2013 Glenn Randers-Pehrson,
| Copyright (C) 1996, 1997 Andreas Dilger,
| Copyright (C) 1995, Guy Eric Schalnat, Group 42 Inc.,
| and zlib version 1.2.8, Copyright (C) 1995 (or later),
| Jean-loup Gailly and Mark Adler.
| It was compiled with gcc version 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28).
Opening file hoge.png for length measurement
Allocating read structure
Allocating read_info, end_info structures
While measuring IDATs in hoge.png pngcrush caught libpng error:
Not a PNG file..