PyGTK: creating a pixbuf from image data

Gustavo Niemeyer niemeyer at conectiva.com
Mon Mar 15 11:40:30 EST 2004


> I'm writing a fractal-generating program in a mixture of C and
> Python. Python handles all the GUI parts using PyGTK. After finishing
> the calculations, I have a buffer containing the RGB data of the
[...]

Here is something I've used in an application some time ago. Not
sure if this is what you want, but will give you a hint.

loader = gtk.gdk.PixbufLoader("jpeg")
loader.write(data)
loader.close()
pixbuf = loader.get_pixbuf()

-- 
Gustavo Niemeyer
http://niemeyer.net




More information about the Python-list mailing list