GTK4 and GDK pixbuf

Hi, the migration document for GTK3 → GTK4 says:

A number of GdkPixbuf-based APIs have been removed.

I can’t tell what this means exactly. For example, in my GTK code I use:

gdk_pixbuf_new_from_file_at_size()
gdk_pixbuf_save()
gdk_pixbuf_get_width()
gdk_pixbuf_scale_simple()
gdk_pixbuf_get_file_info()
gdk_pixbuf_format_get_name()

Will those calls still be supported? (They are still in the GDK documentation.)

thanks

The full quote is:

GdkPixbuf is deemphasized

A number of GdkPixbuf-based APIs have been removed. The available replacements are either using GIcon, or the newly introduced GdkTexture or GdkPaintable classes instead.

If you are dealing with pixbufs, you can use gdk_texture_new_for_pixbuf() to convert them to texture objects where needed.

This is referring to APIs in GTK and GDK that used GdkPixbuf, not to GdkPixbuf itself. GdkPixbuf is a separate library that is still versioned 2.x.

Ok, good to know. thanks for the update!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.