diff options
Diffstat (limited to 'examples/tgaread.c')
-rw-r--r-- | examples/tgaread.c | 7 |
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); } |