"Fix stdout handling for png output", 2012-08-06 from fdb8b4e30e

This commit is contained in:
Harald Oehlmann 2015-12-07 22:41:40 +01:00
parent 3aa27d3ccb
commit a31e562fd4

View File

@ -307,7 +307,11 @@ int png_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width
/* 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); if(symbol->output_options & BARCODE_STDOUT) {
fflush(wpng_info.outfile);
} else {
fclose(wpng_info.outfile);
}
return 0; return 0;
} }
#endif /* NO_PNG */ #endif /* NO_PNG */