Constructor
GdkPixbufPixbufnew_from_data
Declaration [src]
GdkPixbuf*
gdk_pixbuf_new_from_data (
  const guchar* data,
  GdkColorspace colorspace,
  gboolean has_alpha,
  int bits_per_sample,
  int width,
  int height,
  int rowstride,
  GdkPixbufDestroyNotify destroy_fn,
  gpointer destroy_fn_data
)
Description [src]
Creates a new GdkPixbuf out of in-memory image data.
Currently only RGB images with 8 bits per sample are supported.
Since you are providing a pre-allocated pixel buffer, you must also
specify a way to free that data.  This is done with a function of
type GdkPixbufDestroyNotify.  When a pixbuf created with is
finalized, your destroy notification function will be called, and
it is its responsibility to free the pixel array.
See also: gdk_pixbuf_new_from_bytes().
Parameters
- data
- 
            Type: An array of gucharImage data in 8-bit/sample packed format. The data is owned by the caller of the function. 
- colorspace
- 
            Type: GdkColorspaceColorspace for the image data. 
- has_alpha
- 
            Type: gbooleanWhether the data has an opacity channel. 
- bits_per_sample
- 
            Type: intNumber of bits per sample. 
- width
- 
            Type: intWidth of the image in pixels, must be > 0. 
- height
- 
            Type: intHeight of the image in pixels, must be > 0. 
- rowstride
- 
            Type: intDistance in bytes between row starts. 
- destroy_fn
- 
            Type: GdkPixbufDestroyNotifyFunction used to free the data when the pixbuf’s reference count drops to zero, or NULLif the data should not be freed.The argument can be NULL.
- destroy_fn_data
- 
            Type: gpointerClosure data to pass to the destroy notification function. The argument can be NULL.The data is owned by the caller of the function. 
Return value
Type: GdkPixbuf
A newly-created pixbuf.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |