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



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 what’s the correct way to create Pixbuf for About boxes and GdkWidgets for 
image button?

Never used GResource but.. The GdkPixbuf docs has gdk_pixbuf_new_from_resource() which will take the path to the pixdata in the GResource. The path based on your example probably is /myapp/icons/logo.png.

~infirit


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