Registry / utility / libpng

libpng

JSON →
library1.6.57vcpkgunverified

libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.

vcpkg install libpng
INSTALL
IMPORT
SIG · LIBPNG
L
libpng
utilitycppv1.6.57
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

png.h
#include <png.h>

Read PNG image dimensions

#include <png.h> #include <cstdio> int main() { FILE* fp = fopen("test.png", "rb"); if (!fp) return 1; png_structp png = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); png_infop info = png_create_info_struct(png); png_init_io(png, fp); png_read_info(png, info); int width = png_get_image_width(png, info); int height = png_get_image_height(png, info); printf("PNG size: %dx%d\n", width, height); png_destroy_read_struct(&png, &info, nullptr); fclose(fp); return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.6.57latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

libpng — pip install libpng · libregistry