summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorpajoye <none@none>2008-01-15 11:28:43 +0000
committerpajoye <none@none>2008-01-15 11:28:43 +0000
commitdd3f202e71152811045db2e256a619465b3a0707 (patch)
tree5565451896bd0bdfd09546951db6fb35820172a2 /examples
parent1cde5eda0da9e76bd0e5d5581e5b73b442d18c6d (diff)
downloadlibgd-dd3f202e71152811045db2e256a619465b3a0707.tar.gz
- don't try to build when jpeg support is not available
Diffstat (limited to 'examples')
-rw-r--r--examples/nnquant.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/nnquant.c b/examples/nnquant.c
index 8db60a2..28d998c 100644
--- a/examples/nnquant.c
+++ b/examples/nnquant.c
@@ -23,6 +23,7 @@ void save_png(gdImagePtr im, const char *filename)
int main()
{
+#ifdef HAVE_JPEG
gdImagePtr im, im2;
FILE *fp;
char path[2048];
@@ -56,5 +57,9 @@ int main()
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;
}