Re: converting a GdkImage into a GdkPixbuf

Darin Adler <> writes:
> Say I have a GdkImage. What's the best way to convert it into a GdkPixbuf?
> Do I have to do it one pixel at a time?

Yes, though you may want to bypass the get_pixel () function for
performance reasons and go straight to the pixel array.

gdk-pixbuf should already have this code, in the
pixbuf_from_drawable() stuff.

For drawing text as I mentioned in my other mail you could maybe 
make things simple with 1-bit drawables, but now that I think about it
more I don't actually _know_ you can create a 1-bit GdkImage. 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]