mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Prototype implementation of filter selection
This rewrites the code used previously in the heuristics to make it easier to debug and introduces the 'methodical' method, which is intended to be an expensive but reliable way of reducing image size. The code in this commit does not work; the 'methodical' test for success does not take account of data buffered inside zlib and, anyway, it changes the results of pngtest so that the test fails. This commit is just a checkpoint of the current state; another commit will temporarily disable the 'methodical' code. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -325,6 +325,11 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Initialize the alloc/free callbacks every time: */
|
||||
png_ptr->zstream.zalloc = png_zalloc;
|
||||
png_ptr->zstream.zfree = png_zfree;
|
||||
png_ptr->zstream.opaque = png_ptr;
|
||||
|
||||
/* Set this for safety, just in case the previous owner left pointers to
|
||||
* memory allocations.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user