summaryrefslogtreecommitdiff
path: root/examples/nnquant.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2018-06-21 23:55:11 -0400
committerMike Frysinger <vapier@gentoo.org>2018-06-21 23:55:11 -0400
commit08b0dbaec64750b22d8aa195c9bca0455e0e34af (patch)
tree4c77fffdf98b9cd1e67a7e5500d88977d0a6b11d /examples/nnquant.c
parentfd06f7f83c5e78bf5b7f5397746b4e5ee4366250 (diff)
downloadlibgd-08b0dbaec64750b22d8aa195c9bca0455e0e34af.tar.gz
move (redundant) ifdef checks from source to build files
We've been tracking program deps in the build files, so it ends up being redundant for a lot of our test/example programs. Clean them up, and update some of the cmake/automake files as needed.
Diffstat (limited to 'examples/nnquant.c')
-rw-r--r--examples/nnquant.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/examples/nnquant.c b/examples/nnquant.c
index 33ed523..91139b5 100644
--- a/examples/nnquant.c
+++ b/examples/nnquant.c
@@ -12,17 +12,12 @@ void save_png(gdImagePtr im, const char *filename)
fprintf(stderr, "Can't save png image %s\n", filename);
return;
}
-#ifdef HAVE_LIBPNG
gdImagePng(im, fp);
-#else
- printf("No PNG support. Cannot save image.\n");
-#endif
fclose(fp);
}
int main()
{
-#ifdef HAVE_JPEG
gdImagePtr im, im2;
FILE *fp;
char path[2048];
@@ -56,9 +51,5 @@ 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;
}