[cairo] Loading png from a resource
Carl Worth
cworth at cworth.org
Wed Jul 22 11:51:44 PDT 2009
On Thu, 2009-07-16 at 00:45 +0200, gurnett at telia.com wrote:
> Hello
>
> I was wondering if it is possible to load an image (in my case a png) from a
> resource file instead of using
>
> image = cairo_image_surface_create_from_png ("image.png");
I don't know exactly what a resource file is, nor how it works, but
cairo does provide a function:
cairo_surface_t *
cairo_image_surface_create_from_png_stream (cairo_read_func_t read_func,
void *closure)
to which you can provide a custom callback function to do whatever
reading you might need to do, (to then supply the png data to cairo).
I hope that helps, and that you have fun with cairo.
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20090722/dcbc899d/attachment.pgp
More information about the cairo
mailing list