GdkPixbuf and GIOChannel



Hi.

As far as I can see in the source code, the GdkPixbuf loading (from file) is
built upon the stdio FILE interface. It was to be expected, since several
low-level image-loading libraries have a simple API for FILEs, and a more
complex API for more generic I/O.

But in the spirit of the Gtk+ API, some more abstraction was expected,
probably using the GIOChannel API. For example, the following function:

GdkPixbuf * 
gdk_pixbuf_new_from_io_channel (const char *display_name,
                                GIOChannel *io,
				GError    **error);

(then, gdk_pixbuf_new_from_file would only need to be a trivial wrapper
around it).

Such a function would allow, for example, to load pixbufs from userland
virtual filesystems. This can already be done using a loader, but it would
require more specific code; furthermore, loaders for interlaced images are
awfully slow.

I have found a mail in this list three years old where Owen Taylor writes
that "gdk-pixbuf probably should be using a stream API for the loader stuff"
(<URL: http://article.gmane.org/gmane.comp.gnome.devel/1286 >) but it is
lost in a thread on another issue, and there was no follow-up.

May I ask what you think about this issue?

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature



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