RE: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread Alessandro Francesconi
It works! I didn’t know about gdk_pixbuf_new_from_resource() thank you. Ale From: infirit Sent: Sunday, November 11, 2018 11:11:53 PM To: Alessandro Francesconi; gtk-app-devel-list@gnome.org Subject: Re: Working with embedded images with GResource,

Re: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread infirit via gtk-app-devel-list
Op 11-11-18 om 18:23 schreef Alessandro Francesconi: I can’t really understand how Pixbuf expects from the GResource data… also i read in the docs that “gdk_pixbuf_new_from_inline has been deprecated since version 2.32 and should not be used in newly-written code. Use GResource instead.”… so

RE: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread Alessandro Francesconi
Thanks, but for gdk-pixbuf-new-from-data I need to know size and properties of the original image… it’s an information that I find very difficult to obtain. Is there a simpler way? About gdk-pixbuf-new-from-file, for some reasons the images are embedded, so i can’t use it. Regards, Ale

Re: Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread Joël Krähemann via gtk-app-devel-list
Hi, First you create a GdkPixbuf: https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data then set the property of about dialog: https://developer.gnome.org/gtk2/stable/GtkAboutDialog.html#GtkAboutDialog--logo g_object_set(your_about_dialog,

Working with embedded images with GResource, GdkPixbuf and GtkWidget

2018-11-11 Thread Alessandro Francesconi
Hello, I need to show some images inside my GTK+ 2.32 application so I decided to embed them using GResource compiler. I’ve prepared an XML file like this: logo.png <…..> And after “glib-compile-resources.exe --target=icons.c --generate icons.xml”, I correctly have