Re: Creating a pixbuf from a Cairo image surface
- From: Jean Bréfort <jean brefort normalesup org>
- To: Ari Jolma <ari jolma tkk fi>
- Cc: gtk-list gnome org
- Subject: Re: Creating a pixbuf from a Cairo image surface
- Date: Mon, 28 May 2007 16:09:39 +0200
Le lundi 28 mai 2007 �6:39 +0300, Ari Jolma a �it :
> I'm intending to create an image surface in Cairo, draw on it, and, when
> done, create a gdk pixbuf from the image surface. Eventually the pixbuf
> is sent to the server side and converted into an image, or, in an
> alternative scenario it is saved as an image on the client side.
>
> The only problem (not really, just a drawback) I can see in this is the
> fact that cairo formats and what gdk_pixbuf_new_from_data requires do
> not match. AFAIK gdk requires data that is made of 24 bit RGB pixels and
> cairo creates 32 bit ARGB or XRGB (X is unused 8 bits) pixels. So it
> seems that I need to do a copy from one buffer to another in the last
> step in the process.
>
> Am I correct? Or is there something built-in that I could use for the
> conversion.
We have conversion functions in goffice (goffice/utils/go-image.c).
Regards,
Jean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]