From d6d404da4c1a5ae28369a1f1761220165a6dc628 Mon Sep 17 00:00:00 2001 From: taipanromania Date: Fri, 18 Jul 2008 14:44:46 +0000 Subject: [PATCH] if NO_PNG is defined don't compile PNG support --- backend/png.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/png.c b/backend/png.c index 6b4f427e..715cb035 100644 --- a/backend/png.c +++ b/backend/png.c @@ -55,6 +55,7 @@ static void writepng_error_handler(png_structp png_ptr, png_const_charp msg) int png_to_file(struct zint_symbol *symbol, int image_height, int image_width, char *pixelbuf) { +#ifndef NO_PNG struct mainprog_info_type wpng_info; struct mainprog_info_type *graphic; unsigned char outdata[image_width * 3]; @@ -181,7 +182,7 @@ int png_to_file(struct zint_symbol *symbol, int image_height, int image_width, c /* make sure we have disengaged */ if (png_ptr && info_ptr) png_destroy_write_struct(&png_ptr, &info_ptr); fclose(wpng_info.outfile); - +#endif return 0; }