Dear Andrey, Thanks alot for your guidance, but when i change the buffer data, image header is also changed, and when using "gdk_pixbuf_loader_write", an error of "unrecognized image file format" will be arised, this is because that the image format is important for the loader.
is it any way to skip this restriction? Thanks, Zahra Zojaji -----Original Message----- From: Andrey Tsyvarev <tsyva...@ispras.ru> To: zzoj...@aim.com Cc: gtk-app-devel-list@gnome.org Sent: Fri, 15 May 2009 5:39 pm Subject: Re: How can I update the gdk-pixbuf raw data? Hello, Zahra. You can use GdkPixbufLoader for retrieve pixbuf from raw data. Code example: GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); gdk_pixbuf_loader_write(loader, buffer, buffer_size, NULL); gdk_pixbuf_loader_close(loader, NULL); GdkPixbuf* pixbuf = gdk_pixbuf_copy(gdk_pixbuf_loader_get_pixbuf(loader)); g_object_unref(loader); Now 'pixbuf' contains image, previously stored in 'buffer'. If you want to do more complex things, than simple restoring pixbuf from buffer, you may read GdkPixbufLoader description http://library.gnome.org/devel/gdk-pixbuf/stable/GdkPixbufLoader.html > Hello, > I am new to GTK and have a problem with gdk-pixbuf, How can I update the pixbuf raw data? > There is a pixbuf constructed from an image file, I want to > change raw data behind it and upload new data back to pixbuf. I am > using the "gdk_pIxbuf_save_to_buffer" for accessing raw data, but I > don't know how to u pload the buffer back to the pixbuf! > Thanks, in advance, > Zahra Zojaji > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list -- Andrey Tsyvarev Linux Verification Center, ISPRAS web: http://www.linuxtesting.org e-mail: tsyva...@ispras.ru _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list