for_pixbuf
Description:
[ CCode ( cname = "gdk_texture_new_for_pixbuf" ) ]
[ Version ( deprecated = true , deprecated_since = "4.20" ) ]
public static Texture for_pixbuf (Pixbuf pixbuf)
[ Version ( deprecated = true , deprecated_since = "4.20" ) ]
public static Texture for_pixbuf (Pixbuf pixbuf)
Warning: for_pixbuf is deprecated since 4.20.
Creates a new texture object representing the `GdkPixbuf`.
Note:
Use e.g. libglycin, which can load many image formats into a `GdkTexture`
This function is threadsafe, so that you can e.g. use GTask and [method@Gio.Task.run_in_thread] to avoid blocking the main thread while loading a big image.
Parameters:
| pixbuf |
a `GdkPixbuf` |
Returns:
|
a new `GdkTexture` |