mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
if NO_PNG is defined don't compile PNG support
This commit is contained in:
parent
5230f54433
commit
d6d404da4c
@ -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)
|
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 wpng_info;
|
||||||
struct mainprog_info_type *graphic;
|
struct mainprog_info_type *graphic;
|
||||||
unsigned char outdata[image_width * 3];
|
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 */
|
/* make sure we have disengaged */
|
||||||
if (png_ptr && info_ptr) png_destroy_write_struct(&png_ptr, &info_ptr);
|
if (png_ptr && info_ptr) png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
fclose(wpng_info.outfile);
|
fclose(wpng_info.outfile);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user