Registry / other / libgd
library2.3.3vcpkgunverified

An open-source code library for the dynamic creation of images by programmers.

vcpkg install libgd
INSTALL
IMPORT
SIG · LIBGD
L
libgd
othercppv2.3.3
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.

gd.h
#include <gd.h>

Create a true color image, draw a red rectangle, and save as PNG

#include "gd.h" #include <stdio.h> int main() { // Create a 100x100 true color image gdImagePtr im = gdImageCreateTrueColor(100, 100); if (!im) { fprintf(stderr, "Failed to create image\n"); return 1; } // Allocate colors and draw int red = gdImageColorAllocate(im, 255, 0, 0); gdImageFilledRectangle(im, 10, 10, 90, 90, red); // Save as PNG FILE* out = fopen("output.png", "wb"); if (out) { gdImagePng(im, out); fclose(out); } gdImageDestroy(im); return 0; }
Debug
Known issues
gotchalibgd may require additional dependencies (e.g., libpng, libjpeg) for certain output formats; linking may fail if these are not found.
fix
Ensure all required image format libraries are installed and linked via CMake targets like GD::GD.
affects: *
Upgrade
Version history
2.3.3latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources

No resource links recorded.

libgd — pip install libgd · libregistry