Function

VipsBlobnew

Declaration [src]

VipsBlob*
vips_blob_new (
  VipsCallbackFn free_fn,
  void* data,
  size_t length
)

Description [src]

Like vips_area_new(), but track a length as well. The returned VipsBlob takes ownership of data and will free it with free_fn. Pass NULL for free_fn to not transfer ownership.

An area of mem with a free func and a length (some sort of binary object, like an ICC profile).

See also: vips_area_unref().

Parameters

free_fn VipsCallbackFn
 

data will be freed with this function.

data An array of guint8
 

Data to store.

 The length of the array is specified in the length argument.
 The called function takes ownership of the data, and is responsible for freeing it.
length size_t
 

Number of bytes in data.

Return value

Returns: VipsBlob
 

The new VipsBlob.

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