MESSAGE
DATE | 2018-08-06 |
FROM | Ruben Safir
|
SUBJECT | Subject: [Hangout - NYLXS] Fwd: Re: [png-mng-implement] Why is it that png
|
On Thu, 2 Aug 2018 at 02:37, J Decker wrote: > Experimenting with the chromium modified zlib, I found a flag INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
That's in the original zlib, also. But you don't need it.
What you need is the following libpng function call:
png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, PNG_OPTION_ON);
See the libpng manual for details.
To conclude the story from my previous email:
If PNG_MAXIMUM_INFLATE_WINDOW is set to PNG_OPTION_OFF (i.e. the default), libpng can diagnose the error, but not recover from it. Conversely, if PNG_MAXIMUM_INFLATE_WINDOW is set to PNG_OPTION_ON, libpng can decode the image, but not know that the image had an error. It's an either/or proposition, unfortunately.
Sincerely, Cosmin
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ png-mng-implement mailing list png-mng-implement-at-lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/png-mng-implement
_______________________________________________ Hangout mailing list Hangout-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/hangout
|
|