Vips.Area

Fields

Name

Type

Access

Description

client

object

r

count

int

r

data

object

r/w

free_fn

Vips.CallbackFn

r

length

int

r/w

lock

GLib.Mutex

r

n

int

r/w

sizeof_type

int

r

type

GObject.GType

r

Methods

class

free_cb (mem, area)

class

new (free_fn, *data)

class

new_array (type, sizeof_type, n)

class

new_array_object (n)

copy ()

get_data ()

unref ()

Details

class Vips.Area
classmethod free_cb(mem, area)
Parameters:
Return type:

int

classmethod new(free_fn, *data)
Parameters:
Returns:

the new Vips.Area.

Return type:

Vips.Area

A Vips.Area wraps a chunk of memory. It adds reference counting and a free function. It also keeps a count and a GObject.GType, so the area can be an array.

This type is used for things like passing an array of double or an array of Vips.Object pointers to operations, and for reference-counted immutable strings.

Initial count == 1, so _unref() after attaching somewhere.

See also: Vips.Area.unref().

classmethod new_array(type, sizeof_type, n)
Parameters:
  • type (GObject.GType) – GObject.GType of elements to store

  • sizeof_type (int) – sizeof() an element in the array

  • n (int) – number of elements in the array

Returns:

the new Vips.Area.

Return type:

Vips.Area

An area which holds an array of elements of some GObject.GType. To set values for the elements, get the pointer and write.

See also: Vips.Area.unref().

classmethod new_array_object(n)
Parameters:

n (int) – number of elements in the array

Returns:

the new Vips.Area.

Return type:

Vips.Area

An area which holds an array of GObject.Object s. See Vips.Area.new_array(). When the area is freed, each GObject.Object will be unreffed.

Add an extra None element at the end, handy for eg. vips_image_pipeline_array() etc.

See also: Vips.Area.unref().

copy()
Return type:

Vips.Area

get_data()
Returns:

The pointer held by self.

length:

optionally return length in bytes here

n:

optionally return number of elements here

type:

optionally return element type here

sizeof_type:

optionally return sizeof() element type here

Return type:

(object or None, length: int, n: int, type: GObject.GType, sizeof_type: int)

Return the data pointer plus optionally the length in bytes of an area, the number of elements, the GObject.GType of each element and the sizeof() each element.

unref()