save_to_stream


Description:

[ Version ( since = "2.14" ) ]
public bool save_to_stream (OutputStream stream, string type, Cancellable? cancellable = null, ...) throws Error

Saves `pixbuf` to an output stream.

Supported file formats are currently "jpeg", "tiff", "png", "ico" or "bmp". See `gdk_pixbuf_save_to_buffer()` for more details.

The `cancellable` can be used to abort the operation from another thread. If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be returned. Other possible errors are in the `GDK_PIXBUF_ERROR` and `G_IO_ERROR` domains.

The stream is not closed at the end of this call.

Parameters:

this

a `GdkPixbuf`

stream

a `GOutputStream` to save the pixbuf to

type

name of file format

cancellable

optional `GCancellable` object, `NULL` to ignore

...

list of key-value save options

error

return location for error, or `NULL`

Returns:

`TRUE` if the pixbuf was saved successfully, `FALSE` if an error was set.