Util: Fix regression with PNGs
Vicki Pfau vi@endrift.com
Mon, 16 Oct 2017 20:06:52 -0700
1 files changed,
6 insertions(+),
3 deletions(-)
jump to
M
src/util/png-io.c
→
src/util/png-io.c
@@ -47,16 +47,19 @@ if (setjmp(png_jmpbuf(png))) {
return 0; } png_set_IHDR(png, info, width, height, 8, type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - png_write_info(png, info); return info; } png_infop PNGWriteHeader(png_structp png, unsigned width, unsigned height) { - return _pngWriteHeader(png, width, height, PNG_COLOR_TYPE_RGB); + png_infop info = _pngWriteHeader(png, width, height, PNG_COLOR_TYPE_RGB); + png_write_info(png, info); + return info; } png_infop PNGWriteHeaderA(png_structp png, unsigned width, unsigned height) { - return _pngWriteHeader(png, width, height, PNG_COLOR_TYPE_RGB_ALPHA); + png_infop info = _pngWriteHeader(png, width, height, PNG_COLOR_TYPE_RGB_ALPHA); + png_write_info(png, info); + return info; } png_infop PNGWriteHeader8(png_structp png, unsigned width, unsigned height) {