[cairo] Cairo & libpng/zlib parameters
Chris Wilson
chris at chris-wilson.co.uk
Sun Jan 17 02:37:18 PST 2010
On Sat, 16 Jan 2010 22:18:27 +0100, Jeroen van Rijn <jvrnix at gmail.com> wrote:
> In doing this it suddenly occurred to me that it might be possible -
> rather than apply optipng as a secondary stage - to direct Cairo to
> directly output a png file with the zlib and libpng parameters
> mentioned.
>
> My question to you is: Is there an optional parameter to give PyCairo
> or Cairo itself to select a certain png optimization strategy? e.g.
> surface.write_to_png(output_filename, zlib = 'zm=9,zc=9', libpng =
> 'f:1-5')
No, the PNG support in Cairo is principally there for debugging purposes,
it was never intended to be a complete interface. That task was better
suited for a dedicated image decoding/encoding library. If you are happy
with PNG as your graphic format, the simplest approach would be to take
Cairo's code and make it extensible for your needs and overload the
current write_to_png Python function.
Hope this helps, and you have fun using Cairo.
-ickle
P.S. I'm looking for rendering torture tests to add to the performance
benchmarks in cairo-trcaces. The first one I took using oscitymap, shows
that there is a marked improvement with the development branch, but I
would like more examples to broaden our focus.
--
Chris Wilson, Intel Open Source Technology Centre
More information about the cairo
mailing list