Open raichu opened 11 years ago
GTK3 ?
I think it's GTK2.
I checked and GInputStream seems to be a part of glib2 and gdk_pixbuf_new_from_stream
is a part of gdkpixpuf2. Both can be seen in pre-gtk3 sources.
I realized that it's not really necessary for loading images from memory.: I got the job done using gdkpixbuf.Loader
:)
Just one caveat, the Write
function isn't compatible with usual Write
function of Go (io.Writer) so I couldn't use io.Copy
etc.
How about making it return (n int, err error)
? n
can be 0 or the input size depending on the error.
According to the docs, there's
gdk_pixbuf_new_from_stream
but it requiresGInputStream
. Would it be too difficult to handle?