Re: Creating a pixbuf from non-BMP image data
- From: Olexiy Avramchenko <olexiy ctech cn ua>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: Creating a pixbuf from non-BMP image data
- Date: Tue, 12 Jul 2005 18:23:33 +0300
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]