Method

VipsDbufsteal

Declaration [src]

unsigned char*
vips_dbuf_steal (
  VipsDbuf* dbuf,
  size_t* size
)

Description [src]

Destroy a buffer, but rather than freeing memory, a pointer is returned. This must be freed with g_free().

A \0 is appended, but not included in the character count. This is so the pointer can be safely treated as a C string.

Parameters

size size_t*
 

Optionally return length in bytes here.

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

Return value

Returns: guint8
 

The pointer held by dbuf.

 The caller of the method takes ownership of the data, and is responsible for freeing it.