libpng

Library for reading, writing, and manipulating PNG image files.

brewmacoslinux
Try with needOr install directly
Source

About

Library for manipulating PNG images

Examples

check if a PNG file is valid and readable$ pngcheck image.png
get image dimensions and color information from PNG$ pnginfo image.png
convert image to PNG format in a C program$ gcc -o convert convert.c $(pkg-config --cflags --libs libpng)
optimize PNG file size by reducing colors$ pngtopam image.png | pamreduce 2 | pamtopng > optimized.png
extract metadata and PNG chunk information$ pngcrush -v -n image.png /dev/null | head -20