diff options
-rw-r--r-- | converter/other/pnmtopng.c | 17 | ||||
-rw-r--r-- | doc/HISTORY | 5 | ||||
-rw-r--r-- | version.mk | 2 |
3 files changed, 17 insertions, 7 deletions
diff --git a/converter/other/pnmtopng.c b/converter/other/pnmtopng.c index cf053f7e..08263f29 100644 --- a/converter/other/pnmtopng.c +++ b/converter/other/pnmtopng.c @@ -2436,7 +2436,11 @@ doIhdrChunk(struct pngx * const pngxP, unsigned int const depth, bool const colorMapped, bool const colorPng, - bool const alpha) { + bool const alpha, + bool const interlace) { + + int const interlaceMethod = + interlace ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE; int colorType; @@ -2450,7 +2454,8 @@ doIhdrChunk(struct pngx * const pngxP, if (alpha && colorType != PNG_COLOR_TYPE_PALETTE) colorType |= PNG_COLOR_MASK_ALPHA; - pngx_setIhdr(pngxP, width, height, depth, colorType, 0, 0, 0); + pngx_setIhdr(pngxP, width, height, depth, colorType, + interlaceMethod, 0, 0); } @@ -2820,10 +2825,8 @@ convertpnm(struct cmdlineInfo const cmdline, pm_error ("setjmp returns error condition (2)"); } - doIhdrChunk(pngxP, cols, rows, depth, colorMapped, colorPng, alpha); - - if (cmdline.interlace) - pngx_setInterlaceHandling(pngxP); + doIhdrChunk(pngxP, cols, rows, depth, colorMapped, colorPng, alpha, + cmdline.interlace); doGamaChunk(cmdline, pngxP); @@ -2875,6 +2878,8 @@ convertpnm(struct cmdlineInfo const cmdline, /* let libpng take care of, e.g., bit-depth conversions */ pngx_setPacking(pngxP); + pngx_setInterlaceHandling(pngxP); + writeRaster(pngxP, ifP, rasterPos, cols, rows, maxval, format, pngMaxval, depth, alpha, alpha_mask, cht, caht); diff --git a/doc/HISTORY b/doc/HISTORY index f95fc8c0..c450f66e 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,11 @@ Netpbm. CHANGE HISTORY -------------- +19.02.10 BJH Release 10.85.02 + + pnmtopng: fix bug: -interlace ignored. Broken in 10.55 + (June 2011). + 19.01.07 BJH Release 10.85.01 pamstretch: Reject very large scale factors instead of producing diff --git a/version.mk b/version.mk index 24da05a1..b9247c65 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 85 -NETPBM_POINT_RELEASE = 1 +NETPBM_POINT_RELEASE = 2 |