[devel] IDAT compression failed if preceded by a compressed text chunk

This was because the attempt to reset the zlib stream in png_write_IDAT
happened after the first IDAT chunk had been deflated - much too late.
In this change internal functions are added to claim/release the z_stream
and, hopefully, make the code more robust.  Also deflateEnd checking is
added - previously libpng would ignore an error at the end of the stream.
This commit is contained in:
John Bowler
2011-05-05 17:35:39 -05:00
committed by Glenn Randers-Pehrson
parent c559bb58ed
commit c5bef946b1
9 changed files with 203 additions and 104 deletions

View File

@@ -89,6 +89,13 @@ Version 1.5.3beta05 [May 5, 2011]
PNG_NO_WARNINGS does actually work now.
Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte
optimization configureable.
IDAT compression failed if preceded by a compressed text chunk
This was because the attempt to reset the zlib stream in png_write_IDAT
happened after the first IDAT chunk had been deflated - much too late.
In this change internal functions are added to claim/release the z_stream
and, hopefully, make the code more robust. Also deflateEnd checking is
added - previously libpng would ignore an error at the end of the stream.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit