cvs: gd /libgd/examples nnquant.c
[email protected] ("Pierre-Alain Joye") Tue, 15 Jan 2008 11:28:43 -0000
| Newsgroups | php.gd.cvs |
|---|---|
| Message-ID | <cvspajoye1200396523@cvsserver> |
pajoye Tue Jan 15 11:28:43 2008 UTC
Modified files:
/gd/libgd/examples nnquant.c
Log:
- don't try to build when jpeg support is not available
http://cvs.php.net/viewvc.cgi/gd/libgd/examples/nnquant.c?r1=1.3&r2=1.4&diff_format=u
Index: gd/libgd/examples/nnquant.c
diff -u gd/libgd/examples/nnquant.c:1.3 gd/libgd/examples/nnquant.c:1.4
--- gd/libgd/examples/nnquant.c:1.3 Sat Jan 5 20:46:08 2008
+++ gd/libgd/examples/nnquant.c Tue Jan 15 11:28:43 2008
@@ -1,4 +1,4 @@
-/* $Id: nnquant.c,v 1.3 2008/01/05 20:46:08 pajoye Exp $ */
+/* $Id: nnquant.c,v 1.4 2008/01/15 11:28:43 pajoye Exp $ */
/*
* You can fetch a set of samples TIFF images here:
* ftp://ftp.remotesensing.org/pub/libtiff/
@@ -23,6 +23,7 @@
int main()
{
+#ifdef HAVE_JPEG
gdImagePtr im, im2;
FILE *fp;
char path[2048];
@@ -56,5 +57,9 @@
save_png(im, "a_jquant_dither.png");
gdImageDestroy(im);
+#else
+ printf("JPEG support is required for this example. Please recompile GD with JPEG or change this example to use another format as input.");
+ return 1;
+#endif
return 0;
}