summaryrefslogtreecommitdiff
path: root/examples/tgaread.c
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2013-04-04 16:45:13 +0200
committerPierre Joye <pierre.php@gmail.com>2013-04-04 16:45:13 +0200
commit1aa7ad8d2698f0978f83d70c1882a6d548edb41d (patch)
tree4e742ecd3d01a7e1909e302469d1971dba98ed27 /examples/tgaread.c
parent6007934aa4328933a6702d9e3584eeb6c6e613a3 (diff)
downloadlibgd-1aa7ad8d2698f0978f83d70c1882a6d548edb41d.tar.gz
fix examples build
Diffstat (limited to 'examples/tgaread.c')
-rw-r--r--examples/tgaread.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/tgaread.c b/examples/tgaread.c
index 018a3d4..a8e0807 100644
--- a/examples/tgaread.c
+++ b/examples/tgaread.c
@@ -44,8 +44,11 @@ int main()
gdImageDestroy(im);
return 1;
}
-
- gdImagePng(im, fp);
+#ifdef HAVE_LIBPNG
+ gdImagePng(im, fp);
+#else
+ printf("No PNG support. Cannot save image.\n");
+#endif
fclose(fp);
gdImageDestroy(im);
}