The libvips enums¶
This module contains the various libvips enums as Python classes.
Enums values are represented in pyvips as strings. These classes contain the valid strings for each enum.
-
class
pyvips.enums.
BandFormat
[source]¶ The format of image bands.
The format used for each band element. Each corresponds to a native C type for the current machine.
-
UCHAR
¶ str – unsigned char format
-
CHAR
¶ str – char format
-
USHORT
¶ str – unsigned short format
-
SHORT
¶ str – short format
-
UINT
¶ str – unsigned int format
-
INT
¶ str – int format
-
FLOAT
¶ str – float format
-
COMPLEX
¶ str – complex (two floats) format
-
DOUBLE
¶ str – double float format
-
DPCOMPLEX
¶ str – double complex (two double) format
-
-
class
pyvips.enums.
Access
[source]¶ The type of access an operation has to supply.
-
RANDOM
¶ str – Requests can come in any order.
-
SEQUENTIAL
¶ str – Means requests will be top-to-bottom, but with some amount of buffering behind the read point for small non-local accesses.
-
-
class
pyvips.enums.
Interpretation
[source]¶ How the values in an image should be interpreted.
For example, a three-band float image of type LAB should have its pixels interpreted as coordinates in CIE Lab space.
-
MULTIBAND
¶ str – generic many-band image
-
B_W
¶ str – some kind of single-band image
-
HISTOGRAM
¶ str – a 1D image, eg. histogram or lookup table
-
FOURIER
¶ str – image is in fourier space
-
XYZ
¶ str – the first three bands are CIE XYZ
-
LAB
¶ str – pixels are in CIE Lab space
-
CMYK
¶ str – the first four bands are in CMYK space
-
LABQ
¶ str – implies #VIPS_CODING_LABQ
-
RGB
¶ str – generic RGB space
-
CMC
¶ str – a uniform colourspace based on CMC(1:1)
-
LCH
¶ str – pixels are in CIE LCh space
-
LABS
¶ str – CIE LAB coded as three signed 16-bit values
-
SRGB
¶ str – pixels are sRGB
-
HSV
¶ str – pixels are HSV
-
SCRGB
¶ str – pixels are scRGB
-
YXY
¶ str – pixels are CIE Yxy
-
RGB16
¶ str – generic 16-bit RGB
-
GREY16
¶ str – generic 16-bit mono
-
MATRIX
¶ str – a matrix
-
-
class
pyvips.enums.
Angle
[source]¶ Various fixed 90 degree rotation angles.
See for example
rot()
.-
D0
¶ str – no rotate
-
D90
¶ str – 90 degrees clockwise
-
D180
¶ str – 180 degrees
-
D270
¶ str – 90 degrees anti-clockwise
-
-
class
pyvips.enums.
Angle45
[source]¶ Various fixed 45 degree rotation angles.
See for example
rot45()
.-
D0
¶ str – no rotate
-
D45
¶ str – 45 degrees clockwise
-
D90
¶ str – 90 degrees clockwise
-
D135
¶ str – 135 degrees clockwise
-
D180
¶ str – 180 degrees
-
D225
¶ str – 135 degrees anti-clockwise
-
D270
¶ str – 90 degrees anti-clockwise
-
D315
¶ str – 45 degrees anti-clockwise
-
-
class
pyvips.enums.
Intent
[source]¶ The rendering intent.
See
icc_transform()
.-
PERCEPTUAL
¶ str
-
RELATIVE
¶ str
-
SATURATION
¶ str
-
ABSOLUTE
¶ str
-
-
class
pyvips.enums.
Extend
[source]¶ How to extend image edges.
When the edges of an image are extended, you can specify how you want the extension done. See
embed()
,conv()
,affine()
and so on.-
BLACK
¶ str – new pixels are black, ie. all bits are zero.
-
COPY
¶ str – each new pixel takes the value of the nearest edge pixel
-
REPEAT
¶ str – the image is tiled to fill the new area
-
MIRROR
¶ str – the image is reflected and tiled to reduce hash edges
-
WHITE
¶ str – new pixels are white, ie. all bits are set
-
BACKGROUND
¶ str – colour set from the @background property
-
-
class
pyvips.enums.
Precision
[source]¶ Computation precision.
See for example
conv()
.-
INTEGER
¶ str – Integer.
-
FLOAT
¶ str – Floating point.
-
APPROXIMATE
¶ str – Compute approximate result.
-
-
class
pyvips.enums.
Coding
[source]¶ How pixels are coded.
Normally, pixels are uncoded and can be manipulated as you would expect. However some file formats code pixels for compression, and sometimes it’s useful to be able to manipulate images in the coded format.
-
NONE
¶ str – pixels are not coded
-
LABQ
¶ str – pixels encode 3 float CIELAB values as 4 uchar
-
RAD
¶ str – pixels encode 3 float RGB as 4 uchar (Radiance coding)
-
-
class
pyvips.enums.
Direction
[source]¶ A direction.
Operations like
flip()
need to be told whether to flip left-right or top-bottom.-
HORIZONTAL
¶ str – left-right
-
VERTICAL
¶ str – top-bottom
-
-
class
pyvips.enums.
Align
[source]¶ Various types of alignment.
See
join()
, for example.-
LOW
¶ str – Align on the low coordinate edge
-
CENTRE
¶ str – Align on the centre
-
HIGH
¶ str – Align on the high coordinate edge
-
-
class
pyvips.enums.
Combine
[source]¶ How to combine passes.
See for example
compass()
.-
MAX
¶ str – Take the maximum of all values.
-
SUM
¶ str – Take the sum of all values.
-
-
class
pyvips.enums.
PCS
[source]¶ Set Perofile Connection Space.
See for example
icc_import()
.-
LAB
¶ str – CIE Lab space.
-
XYZ
¶ str – CIE XYZ space.
-