Source

gd-libgd / src / webpng.c

Diff from to

File src/webpng.c

       exit (1);
     }
   /* Now load the image. */
+#ifdef HAVE_LIBPNG
   im = gdImageCreateFromPng (in);
+#else
+  fprintf(stderr, "No PNG library support.\n");
+#endif
   fclose (in);
   /* If the load failed, it must not be a PNG file. */
   if (!im)
 	}
 
       /* Write the new PNG. */
+#ifdef HAVE_LIBPNG
       gdImagePng (im, out);
-
+#else
+      fprintf(stderr, "No PNG library support.\n");
+#endif
       if (!useStdinStdout)
 	{
 	  fclose (out);