maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] Re: [cairo] Cairo & libpng/zlib parameters


From: Chris Wilson
Subject: [Maposmatic-dev] Re: [cairo] Cairo & libpng/zlib parameters
Date: Sun, 17 Jan 2010 10:37:18 +0000

On Sat, 16 Jan 2010 22:18:27 +0100, Jeroen van Rijn <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]