[poppler] Patches for SplashBitmap/PNGWriter

Stefan Thomas thomas at txtbear.com
Fri Jul 9 17:18:35 PDT 2010


Hello!

I've got two new patches for the cause.

The first one adds transparent PNG support to PNGWriter and 
SplashBitmap. The uses for this are varied and many, so I think it makes 
sense to add this to the mainline, even though I don't have the pdftoppm 
patch to go along with it. (We're using it in a custom SplashOutputDev.)

The second one fixes a nasty bug in SplashBitmap that causes "pdftoppm 
-jpeg" to randomly produce corrupt images. Currently SplashBitmap frees 
its temporary buffers and later calls ImgWriter::close(). Problem is 
libjpeg still uses these temporary buffers during 
jpeg_finish_compress(). So if they've been reclaimed - bad things 
happen. Usually libjpeg aborts and produces an image with the bottom 
fifty or so rows missing. The patch also fixes the SplashBitmap throwing 
a splashErrGeneric despite success, which was due to a missing question 
mark before writer->close().

Hope you find it useful.

Cheers,

Stefan Thomas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Add-support-for-transparent-PNGs-to-PNGWriter-and-Sp.patch
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100710/2fdd5476/attachment.ksh>


More information about the poppler mailing list