Constructor
GeglBufferlinear_new_from_data
Declaration [src]
GeglBuffer*
gegl_buffer_linear_new_from_data (
  const gpointer data,
  const Babl* format,
  const GeglRectangle* extent,
  gint rowstride,
  GDestroyNotify destroy_fn,
  gpointer destroy_fn_data
)
Description [src]
Creates a GeglBuffer backed by a linear memory buffer that already exists,
of the given extent in the specified format. babl_format (“R’G’B’A u8”)
for instance to make a normal 8bit buffer.
This constructor is not directly available to language bindings.
Parameters
- data
- 
            Type: const gpointerA pointer to a linear buffer in memory. The argument can be NULL.
- format
- 
            Type: BablThe format of the data in memory. The data is owned by the caller of the function. 
- extent
- 
            Type: GeglRectangleThe dimensions (and upper left coordinates) of linear buffer. The data is owned by the caller of the function. 
- rowstride
- 
            Type: gintThe number of bytes between rowstarts in memory (or 0 to autodetect). 
- destroy_fn
- 
            Type: GDestroyNotifyFunction to call to free data or NULL if memory should not be freed. 
- destroy_fn_data
- 
            Type: gpointerExtra argument to be passed to void destroy(ptr, data) type function. The argument can be NULL.The data is owned by the caller of the function. 
Return value
Type: GeglBuffer
A GeglBuffer that can be used as any other GeglBuffer.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |