[libpng15] Disabled part of the CMF optimization of non-IDAT compressed

chunks, which was added at libpng-1.5.4.  It sometimes produces too small
of a window.  This has been fixed in libpng-1.6.0.
This commit is contained in:
Glenn Randers-Pehrson
2012-03-09 17:29:31 -06:00
parent 8f7fc403e5
commit 0b8b358b98
3 changed files with 11 additions and 3 deletions

View File

@@ -619,6 +619,7 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
if (comp->num_output_ptr)
{
#if 0 /* The following sometimes produces incorrect zlib datastreams */
if (comp->output_ptr[0][0] != z_cmf)
{
int tmp;
@@ -628,6 +629,7 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f;
comp->output_ptr[0][1] = (png_byte)tmp;
}
#endif /* 0 */
}
else
{