Re: Creating a pixbuf from non-BMP image data

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

 



Murray Cumming wrote:
gdk_pixbuf_new_from_file() can create a GdkPixbuf from various image
formats. But gdk_pixbuf_new_from_data() can only take BMP-formatted
images.

If I know, for instance, that my buffer contains a PNG image, how can I
create a GdkPixbuf for it, so I can display it? Do I really have to save
it to a temporary file?
Just use GdkPixbufLoader. Create an object and feed it with data. Look at gtk-demo, "image.c" file for sample.

http://developer.gnome.org/doc/API/2.0/gdk-pixbuf/GdkPixbufLoader.html

	Olexiy
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux