Vips.Blob¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
area |
r/w |
Methods¶
class |
|
class |
|
|
|
|
Details¶
- class Vips.Blob¶
- classmethod copy(data)¶
-
Like [ctor`Blob`.new], but take a copy of the data. Useful for bindings which struggle with callbacks.
::: seealso [ctor`Blob`.new].
- classmethod new(free_fn, data)¶
- Parameters:
free_fn (
Vips.CallbackFnorNone) – data will be freed with this functiondata (
bytes) – data to store
- Returns:
the new [struct`Blob`].
- Return type:
Like [ctor`Area`.new], but track a length as well. The returned [struct`Blob`] takes ownership of data and will free it with free_fn. Pass
NULLfor 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).
::: seealso [method`Area`.unref].
- get()¶
- Returns:
the data
- Return type:
Get the data from a [struct`Blob`].
::: seealso [ctor`Blob`.new].
- set(free_fn, data)¶
- Parameters:
free_fn (
Vips.CallbackFnorNone) – data will be freed with this functiondata (
bytes) – data to store
Any old data is freed and new data attached.
It’s sometimes useful to be able to create blobs as empty and then fill them later.
::: seealso [ctor`Blob`.new].