GObject

class pyvips.gobject.GObject(pointer)[source]

Manage GObject lifetime.

__init__(pointer)[source]

Wrap around a pointer.

Wraps a GObject instance around an underlying pointer. When the instance is garbage-collected, the underlying object is unreferenced.

static new_pointer_from_gtype(gtype)[source]

Make a new GObject pointer from a gtype.

This is useful for subclasses which need to control the construction process.

You can pass the result pointer to the Python constructor for the object you are building. You will need to call VipsObject.build() to finish construction.

Returns

A pointer to a new GObject.

Raises

.Error

signal_connect(name, callback)[source]

Connect to a signal on this object.

The callback will be triggered every time this signal is issued on this instance. It will be passed the image (‘self’ here), and a single void * pointer from libvips.

The value of the pointer, if any, depends on the signal – for example, ::eval passes a pointer to a VipsProgress struct.