mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user