Method

GdkPixbufPixbufsave_to_callback

Declaration [src]

gboolean
gdk_pixbuf_save_to_callback (
  GdkPixbuf* pixbuf,
  GdkPixbufSaveFunc save_func,
  gpointer user_data,
  const char* type,
  GError** error,
  ...
)

Description [src]

Saves pixbuf in format type by feeding the produced data to a callback.

This function can be used when you want to store the image to something other than a file, such as an in-memory buffer or a socket.

If error is set, FALSE will be returned. Possible errors include those in the GDK_PIXBUF_ERROR domain and whatever the save function generates.

See gdk_pixbuf_save() for more details.

Available since:2.4
This method is not directly available to language bindings.

Parameters

save_func GdkPixbufSaveFunc
 

A function that is called to save each block of data that the save routine generates.

user_data gpointer
 

User data to pass to the save function.

 The argument can be NULL.
 The data is owned by the caller of the function.
type const char*
 

Name of file format.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
error GError
 

Return location for error, or NULL

 The argument can be NULL.
 The data is owned by the caller of the function.
...
 

List of key-value save options.

Return value

Returns: gboolean
 

Whether an error was set.