Vips.Blob

Fields

Name

Type

Access

Description

area

Vips.Area

r/w

Methods

class

copy (data)

class

new (free_fn, data)

get ()

set (free_fn, data)

Details

class Vips.Blob
classmethod copy(data)
Parameters:

data (bytes) – data to store

Returns:

the new Vips.Blob.

Return type:

Vips.Blob

Like Vips.Blob.new(), but take a copy of the data. Useful for bindings which struggle with callbacks.

See also: Vips.Blob.new().

classmethod new(free_fn, data)
Parameters:
Returns:

the new Vips.Blob.

Return type:

Vips.Blob

Like Vips.Area.new(), but track a length as well. The returned Vips.Blob takes ownership of data and will free it with free_fn. Pass None 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().

get()
Returns:

the data

Return type:

bytes

Get the data from a Vips.Blob.

See also: Vips.Blob.new().

set(free_fn, data)
Parameters:

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.

See also: Vips.Blob.new().