[cairo] cairo_image_surface_get_data() & data lengt

Gerdus van Zyl gerdusvanzyl at gmail.com
Mon Feb 9 07:28:47 PST 2009


cairo_image_surface_get_data get you a pointer to the image data, so
it's not a png. From a quick glance at imagemagick
MagickImportImagePixels looks the appropriate function.

On Mon, Feb 9, 2009 at 4:15 PM, P.Romero <romero619 at hotmail.com> wrote:
> 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
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>


More information about the cairo mailing list