#include <png.h>
png_uint_32 png_get_image_width(png_structp png_ptr, png_infop info_ptr);
png_uint_32 png_get_image_width
png_get_image_width() returns the image width in pixels.
Returns 0 if png_ptr or info_ptr is NULL, image_width otherwise.