Re: How can I update the gdk-pixbuf raw data?
- From: Andrey Tsyvarev <tsyvarev ispras ru>
- To: zzojaji aim com
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How can I update the gdk-pixbuf raw data?
- Date: Fri, 15 May 2009 18:09:16 +0400
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 upload 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: tsyvarev ispras ru
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]