[cairo] postscript image ascii encoding and compression
cworth at redhat.com
Thu Mar 23 15:46:04 PST 2006
On Thu, 02 Mar 2006 16:37:02 +0100, Alexander Larsson wrote:
> 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.
Thanks so much for the contributions, Alex!
I hadn't even realized that we had all the image compression disabled
(*blush*). But it's quite nice to be spitting out ASCII files that
conform to PostScript level 2 now. That should help portability of the
PostScript output quite a bit.
As you know, I committed these changes from you last week.
And, last weekend I found myself with some free time so I whipped up
an original implementation of LZW as well. I started doing this to
make the code easier to read. For example, I thought I would be able
to use cairo_hash_table_t instead of doing a one-off hash here. But,
as it turns out, cairo_hash_table_t slowed things down a bit, so I
ended up doing my own one-off thing anyway.
I still think the result is easier to read, but if nothing else, I at
least understand this code and have some good confidence in being able
to maintain it now. And as a side effect bonus, we get rid of any hint
of any code in cairo with something that looks like an advertising
If anyone's curious, the new LZW implementation can be seen here:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060323/28ce7f60/attachment.pgp
More information about the cairo