Should use gdk-pixbuf's stream API
It should be possible to convert eog-image.c
to use gdk-pixbuf's stream API. Currently it uses GdkPixbufLoader
by hand, which is suboptimal:
-
The code has two sources of possible errors to consider - the GIO functions to read image data, and the
GdkPixbufLoader
functions to write data. -
Pixbuf loaders may move to natively supporting streams, instead of the old-style progressive API.
One thing I'm not completely sure about yet is how streaming would work with the current scheme of just reading the image headers to read the image size. I think EOG can just use gdk_pixbuf_get_file_info_async
for this; the counterpart gdk_pixbuf_get_file_info_finish
returns the image size to the caller.