Pixbuf.from_stream_at_scale_async
Description:
[ CCode ( finish_name = "gdk_pixbuf_new_from_stream_finish" , has_construct_function = false , type = "void" ) ]
[ Version ( since = "2.24" ) ]
public async Pixbuf.from_stream_at_scale_async (InputStream stream, int width, int height, bool preserve_aspect_ratio, Cancellable? cancellable = null) throws Error
Creates a new pixbuf by asynchronously loading an image from an input stream.
For more details see Pixbuf.from_stream_at_scale, 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
Pixbuf.from_stream_async.end to get the result of the
operation.
Parameters:
stream |
a `GInputStream` 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
|
preserve_aspect_ratio |
`TRUE` to preserve the image's aspect ratio
|
cancellable |
optional `GCancellable` object, `NULL` to ignore
|
callback |
a `GAsyncReadyCallback` to call when the pixbuf is loaded
|
user_data |
the data to pass to the callback function
|