GNOME Bugzilla – Bug 696917
Add gdk_pixbuf_loader_write_bytes()
Last modified: 2013-03-30 19:19:01 UTC
Currently, it's impossible to use GInputStream.read() and read_async() with GdkPixbufLoader from a language binding using introspection. We added the read_bytes() and read_bytes_async() variants exactly for this use case, but GBytes.get_data() is currently not introspectable because of the gconstpointer return value. While we wait for a solution for that, we should have enough API to make GdkPixbufLoader work.
Created attachment 240173 [details] [review] loader: Add gdk_pixbuf_loader_write_bytes() A GBytes variant to gdk_pixbuf_loader_write(), which allows language bindings to actually be able to use the Gio GInputStream.read_bytes() method with GdkPixbufLoader.
Created attachment 240174 [details] simple test case this test shows how to use GdkPixbufLoader.write_bytes() with GInputStream.read_bytes() from python.
Review of attachment 240173 [details] [review]: Sure, looks fine to me - just add it to the docs as well
Attachment 240173 [details] pushed as 7e5ee66 - loader: Add gdk_pixbuf_loader_write_bytes() thanks, pushed to master. I also branched before the commit, and created the gdk-pixbuf-2-28 branch.