Pixbuf.newFromStreamAtScaleAsync
void newFromStreamAtScaleAsync(gio.input_stream.InputStream stream, int width, int height, bool preserveAspectRatio, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Creates a new pixbuf by asynchronously loading an image from an input stream.
For more details see gdkpixbuf.pixbuf.Pixbuf.newFromStreamAtScale, which is the synchronous version of this function.
When the operation is finished, callback will be called in the main thread. You can then call gdkpixbuf.pixbuf.Pixbuf.newFromStreamFinish to get the result of the operation.
Parameters
stream | a gio.input_stream.InputStream from which to load the pixbuf |
width | the width the image should have or -1 to not constrain the width |
height | the height the image should have or -1 to not constrain the height |
preserveAspectRatio | TRUE to preserve the image's aspect ratio |
cancellable | optional gio.cancellable.Cancellable object, NULL to ignore |
callback | a gio.types.AsyncReadyCallback to call when the pixbuf is loaded |