[cairo] Writing PNG text information into a PNG using cairo-surface-write-to-png-stream

Andrea Canciani ranma42 at gmail.com
Tue Dec 21 01:52:34 PST 2010


On Tue, Dec 21, 2010 at 10:39 AM, Ben Bullock
<benkasminbullock at gmail.com> wrote:
> Is there any way to add text information as described in the PNG
> specification here:
>
> http://www.w3.org/TR/PNG/#11textinfo
>
> to a Cairo-generated png when using the following function:
>
> http://cairographics.org/manual/cairo-PNG-Support.html#cairo-surface-write-to-png-stream
>
> ? I can't see how to do this.

The png API in cairo is a "toy" API.

If you need more control over the output (additional PNG tags,
different compression
or file format) you should access the data directly using
http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-data
Please remember that you should call
http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-flush
before reading the data.

Andrea


More information about the cairo mailing list