Flags

Details

class Vips.ArgumentFlags(value)

Bases: GObject.GFlags

Flags we associate with each object argument.

Have separate input & output flags. Both set is an error; neither set is OK.

Input gobjects are automatically reffed, output gobjects automatically ref us. We also automatically watch for “destroy” and unlink.

Vips.ArgumentFlags.SET_ALWAYS is handy for arguments which are set from C. For example, Vips.Image ::width is a property that gives access to the Xsize member of struct _VipsImage. We default its ‘assigned’ to True since the field is always set directly by C.

Vips.ArgumentFlags.DEPRECATED arguments are not shown in help text, are not looked for if required, are not checked for “have-been-set”. You can deprecate a required argument, but you must obviously add a new required argument if you do.

Input args with Vips.ArgumentFlags.MODIFY will be modified by the operation. This is used for things like the in-place drawing operations.

NONE = 0

no flags

REQUIRED = 1

must be set in the constructor

MODIFY = 128

the input argument will be modified

INPUT = 16

is an input argument (one we depend on)

CONSTRUCT = 2

can only be set in the constructor

OUTPUT = 32

is an output argument (depends on us)

SET_ONCE = 4

can only be set once

DEPRECATED = 64

just there for back-compat, hide

SET_ALWAYS = 8

don’t do use-before-set checks

class Vips.ForeignFlags(value)

Bases: GObject.GFlags

Some hints about the image loader.

Vips.ForeignFlags.PARTIAL means that the image can be read directly from the file without needing to be unpacked to a temporary image first.

Vips.ForeignFlags.SEQUENTIAL means that the loader supports lazy reading, but only top-to-bottom (sequential) access. Formats like PNG can read sets of scanlines, for example, but only in order.

If neither PARTIAL or SEQUENTIAL is set, the loader only supports whole image read. Setting both PARTIAL and SEQUENTIAL is an error.

Vips.ForeignFlags.BIGENDIAN means that image pixels are most-significant byte first. Depending on the native byte order of the host machine, you may need to swap bytes. See vips_copy().

NONE = 0

no flags set

PARTIAL = 1

the image may be read lazilly

BIGENDIAN = 2

image pixels are most-significant byte first

SEQUENTIAL = 4

top-to-bottom lazy reading

ALL = 7
class Vips.ForeignPngFilter(value)

Bases: GObject.GFlags

http://www.w3.org/TR/PNG-Filters.html The values mirror those of png.h in libpng.

PAETH = 128

pick best neighbor predictor automatically

SUB = 16

difference to the left

ALL = 248

adaptive

UP = 32

difference up

AVG = 64

average of left and up

NONE = 8

no filtering

class Vips.OperationFlags(value)

Bases: GObject.GFlags

Flags we associate with an operation.

Vips.OperationFlags.SEQUENTIAL means that the operation works like vips_conv(): it can process images top-to-bottom with only small non-local references.

Every scan-line must be requested, you are not allowed to skip ahead, but as a special case, the very first request can be for a region not at the top of the image. In this case, the first part of the image will be read and discarded

Every scan-line must be requested, you are not allowed to skip ahead, but as a special case, the very first request can be for a region not at the top of the image. In this case, the first part of the image will be read and discarded

Vips.OperationFlags.NOCACHE means that the operation must not be cached by vips.

Vips.OperationFlags.DEPRECATED means this is an old operation kept in vips for compatibility only and should be hidden from users.

NONE = 0

no flags

SEQUENTIAL = 1

can work sequentially with a small buffer

SEQUENTIAL_UNBUFFERED = 2
NOCACHE = 4

must not be cached

DEPRECATED = 8

a compatibility thing