Vips.Connection

g GObject.Object GObject.Object Vips.Object Vips.Object GObject.Object->Vips.Object Vips.Connection Vips.Connection Vips.Object->Vips.Connection

Subclasses:

Vips.Source, Vips.Target

Methods

Inherited:

Vips.Object (27), GObject.Object (37)

Structs:

Vips.ObjectClass (1), GObject.ObjectClass (5)

filename ()

nick ()

Virtual Methods

Inherited:

Vips.Object (9), GObject.Object (7)

Properties

Inherited:

Vips.Object (2)

Name

Type

Flags

Short Description

descriptor

int

r/w

File descriptor for read or write

filename

str

r/w

Name of file to open

Signals

Inherited:

Vips.Object (4), GObject.Object (1)

Fields

Inherited:

Vips.Object (4), GObject.Object (1)

Name

Type

Access

Description

close_descriptor

int

r

descriptor

int

r

parent_object

Vips.Object

r

tracked_descriptor

int

r

Class Details

class Vips.Connection(**kwargs)
Bases:

Vips.Object

Abstract:

Yes

Structure:

Vips.ConnectionClass

An abstract base class representing a source or sink of bytes.

It can be connected to a network socket, for example, or perhaps a Node.js stream, or to an area of memory. This allows it to support operations like JPEG loading, see for example [ctor`Image`.jpegload_source].

Subclass to add other input sources. Use [class`SourceCustom`] and [class`TargetCustom`] to make a source or target with action signals. These classes provide action signals such as:

  • [signal`SourceCustom`:py:func:::read<Vips.Connection.signals.read>] for reading data from a custom source.

  • [signal`SourceCustom`:py:func:::seek<Vips.Connection.signals.seek>] for seeking within a data stream.

  • [signal`TargetCustom`:py:func:::write<Vips.Connection.signals.write>] for writing data to a custom target.

filename()
Returns:

any filename associated with this connection, or NULL.

Return type:

str

nick()
Returns:

a string describing this connection which could be displayed to a user.

Return type:

str

Property Details

Vips.Connection.props.descriptor
Name:

descriptor

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

File descriptor for read or write

Vips.Connection.props.filename
Name:

filename

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Name of file to open