[cairo] cairo_image_surface_get_data() & data length

P.Romero romero619 at hotmail.com
Mon Feb 9 06:15:13 PST 2009


How can I get the (byte) length of the in-memory image data, whose location
is returned from cairo_image_surface_get_data() ????

 

I need to pass an in-memory png image to ImageMagick, using MagickWand's
MagickReadImageBlob() function.

This readImageblob function expects a pointer to the image data, and also
the length of the data.

 

Also, is this in-memory image data an exact representation of an on-disk png
file???

i.e., in theory, could I manually access the data in memory and print it to
a file or to STDOUT and have a valid, working png image???

Or, would it still require formatting and/or some kind of
meta-data/attributes????

 

Please help, Thanks.

P.Romero 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20090209/9e1fd179/attachment.html 


More information about the cairo mailing list