1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#include <stdio.h> #include "gd.h" #include "gdtest.h" int main() { gdImagePtr im; FILE *fp; char path[1024]; sprintf(path, "%s/gif/bug00060.gif", GDTEST_TOP_DIR); fp = fopen(path, "rb"); if (!fp) { printf("cannot open <%s>\n", path); return -1; } im = gdImageCreateFromGif(fp); fclose(fp); gdImageDestroy(im); return 0; }