[cairo] postscript image ascii encoding and compression
alexl at redhat.com
Thu Mar 2 07:37:02 PST 2006
On Wed, 2006-03-01 at 17:53 +0100, Alexander Larsson wrote:
> The current postscript backend output binary data for images. This means
> that I'm unable to print cairo-generated postscript on my printer. So, I
> implemented base85 encoding of the images in the postscript.
> While I was doing that I noticed that image compression was almost
> finished, but not quite hooked up, so I fixed that too.
> Patch against latest cvs attached.
Here is a new version of the patch that adds support code for LZW
compression and uses that. This means we're back to postscript level 2,
which is good for printing. Since I added base85 coding of image data I
also changed DocumentData to Clean7Bit. As far as I can tell there was
no other code that wrote binary data to the postscript file.
Here is the Changelog entry:
2006-03-02 Alexander Larsson <alexl at redhat.com>
Add cairo-lzw.c to sources
Remove erronous space at start of line
New file implementing _cairo_compress_lzw which does Lempel-Ziv & Welch
compression as used by postscript. Based on code from libtiff.
Add _cairo_output_stream_write_base85_string which implements
an encoder for the ASCII85Decode postscript filter.
Add _cairo_compress_lzw and _cairo_output_stream_write_base85_string.
Write Images LZW + Base85 encoded.
Change ps level to 2 (we only needed level 3 for FlateDecode).
Change DocumentData to Clean7Bit as we don't include binary data
Alexander Larsson Red Hat, Inc
alexl at redhat.com alla at lysator.liu.se
He's a lonely chivalrous photographer who hides his scarred face behind a
mask. She's a wealthy blonde mechanic who don't take no shit from nobody. They
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 21853 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060302/6222f27d/cairo-ps-compressed-images-2-0001.bin
More information about the cairo