Re: Why is it that png files are not dependable over the long haul
J Decker <[email protected]> Mon, 6 Aug 2018 07:31:04 -0700
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <CAA2GJqUhTgA5zThBK=Mbvb1+XD9iRt5Q_2dBn-26==teSSBS-g@mail.gmail.com> |
Nice :) https://drive.google.com/file/d/1THXAybb6U8PeYIfJsN2CzELBmt-wXG3L/view?usp=sharing They're not broken. add > png_set_option(png_ptr, > PNG_MAXIMUM_INFLATE_WINDOW, > PNG_OPTION_ON); to decoding. On Mon, Aug 6, 2018 at 12:35 AM Ruben Safir <ruben-v1XHP5QhJixWk0Htik3J/[email protected]> wrote: > On 08/05/2018 11:36 PM, Cosmin Truta wrote: > > 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 > > > > Am I going to be able to recover these image files? > > Ruben > > > > ------------------------------------------------------------------------------ > 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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/png-mng-implement > ------------------------------------------------------------------------------ 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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/png-mng-implement