This fixes ticket #90. And for those who use these image loading functions note that there are still these leaks described in ticket #89 (not introduced by this patch, but it seems that this patch introduces some leak, smask will not be deallocated in case some method of PdfImage throws).
On Mon, Jun 15, 2020 at 9:17 AM zyx <[email protected]> wrote: > On Fri, 2020-06-12 at 11:28 +0200, Christian Sakowski wrote: > > this patch is currently not part of the trunk but very important! Can > > someone check this in, please? > > Hi, > thanks for the reminder. I missed it in the mailing list. > > That patch, even the file itself, is a nice mix of different coding > styles. Not a big deal, just being noticed. > > It introduced a new compiler warning here: > > .../src/podofo/doc/PdfImage.cpp: In function ‘void > PoDoFo::LoadFromPngContent(png_structp, png_infop, PoDoFo::PdfImage*)’: > .../src/podofo/doc/PdfImage.cpp:934:91: warning: suggest parentheses > around ‘&&’ within ‘||’ [-Wparentheses] > 934 | color_type == PNG_COLOR_TYPE_PALETTE && > png_get_valid(pPng, pInfo, PNG_INFO_tRNS) && png_get_tRNS(pPng, pInfo, > &paletteTrans, &numTransColors, NULL)) > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > which I fixed before committing. I also made the LoadFromPngContent() a > static function. > > I cannot really test this, thus I trust you with this. > > The patch had been committed as r2011: > http://sourceforge.net/p/podofo/code/2011 > > Thanks and bye, > zyx > > > > _______________________________________________ > Podofo-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/podofo-users >
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
