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.
BandFormat.
The format used for each band element.
Each corresponds to a native C type for the current machine. For example, #VIPS_FORMAT_USHORT is <type>unsigned short</type>.
invalid setting
str
unsigned char format
str
char format
str
unsigned short format
str
short format
str
unsigned int format
str
int format
str
float format
str
complex (two floats) format
str
double float format
str
double complex (two double) format
str
BlendMode.
The various Porter-Duff and PDF blend modes. See vips_composite(), for example.
The Cairo docs have a nice explanation of all the blend modes:
https://www.cairographics.org/operators
The non-separable modes are not implemented.
where the second object is drawn, the first is removed
str
the second object is drawn as if nothing were below
str
the image shows what you would expect if you held two semi-transparent slides on top of each other
str
the first object is removed completely, the second is only drawn where the first was
str
the second is drawn only where the first isn’t
str
this leaves the first object mostly intact, but mixes both objects in the overlapping area
str
leaves the first object untouched, the second is discarded completely
str
like OVER, but swaps the arguments
str
like IN, but swaps the arguments
str
like OUT, but swaps the arguments
str
like ATOP, but swaps the arguments
str
something like a difference operator
str
a bit like adding the two images
str
a bit like the darker of the two
str
at least as dark as the darker of the two inputs
str
at least as light as the lighter of the inputs
str
multiplies or screens colors, depending on the lightness
str
the darker of each component
str
the lighter of each component
str
brighten first by a factor second
str
darken first by a factor of second
str
multiply or screen, depending on lightness
str
darken or lighten, depending on lightness
str
difference of the two
str
somewhat like DIFFERENCE, but lower-contrast
str
Coding.
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.
The gaps in the numbering are historical and must be maintained. Allocate new numbers from the end.
pixels are not coded
str
pixels encode 3 float CIELAB values as 4 uchar
str
pixels encode 3 float RGB as 4 uchar (Radiance coding)
str
Interpretation.
How the values in an image should be interpreted. For example, a three-band float image of type #VIPS_INTERPRETATION_LAB should have its pixels interpreted as coordinates in CIE Lab space.
RGB and sRGB are treated in the same way. Use the colourspace functions if you want some other behaviour.
The gaps in numbering are historical and must be maintained. Allocate new numbers from the end.
generic many-band image
str
some kind of single-band image
str
a 1D image, eg. histogram or lookup table
str
the first three bands are CIE XYZ
str
pixels are in CIE Lab space
str
the first four bands are in CMYK space
str
implies #VIPS_CODING_LABQ
str
generic RGB space
str
a uniform colourspace based on CMC(1:1)
str
pixels are in CIE LCh space
str
CIE LAB coded as three signed 16-bit values
str
pixels are sRGB
str
pixels are CIE Yxy
str
image is in fourier space
str
generic 16-bit RGB
str
generic 16-bit mono
str
a matrix
str
pixels are scRGB
str
pixels are HSV
str
DemandStyle.
See vips_image_pipelinev(). Operations can hint to the VIPS image IO system about the kind of demand geometry they prefer.
These demand styles are given below in order of increasing restrictiveness. When demanding output from a pipeline, vips_image_generate() will use the most restrictive of the styles requested by the operations in the pipeline.
#VIPS_DEMAND_STYLE_THINSTRIP — This operation would like to output strips the width of the image and a few pels high. This is option suitable for point-to-point operations, such as those in the arithmetic package.
This option is only efficient for cases where each output pel depends upon the pel in the corresponding position in the input image.
#VIPS_DEMAND_STYLE_FATSTRIP — This operation would like to output strips the width of the image and as high as possible. This option is suitable for area operations which do not violently transform coordinates, such as vips_conv().
#VIPS_DEMAND_STYLE_SMALLTILE — This is the most general demand format. Output is demanded in small (around 100x100 pel) sections. This style works reasonably efficiently, even for bizzare operations like 45 degree rotate.
#VIPS_DEMAND_STYLE_ANY — This image is not being demand-read from a disc file (even indirectly) so any demand style is OK. It’s used for things like vips_black() where the pixels are calculated.
See also: vips_image_pipelinev().
demand in small (typically 64x64 pixel) tiles
str
demand in fat (typically 10 pixel high) strips
str
demand in thin (typically 1 pixel high) strips
str
OperationRelational.
See also: vips_relational().
==
str
!=
str
<
str
<=
str
>
str
>=
str
OperationBoolean.
See also: vips_boolean().
&
str
str
^
str
>>
str
<<
str
OperationMath2.
See also: vips_math().
pow( left, right )
str
pow( right, left )
str
atan2( left, right )
str
OperationComplex2.
See also: vips_complex2().
convert to polar coordinates
str
OperationMath.
See also: vips_math().
sin(), angles in degrees
str
cos(), angles in degrees
str
tan(), angles in degrees
str
asin(), angles in degrees
str
acos(), angles in degrees
str
atan(), angles in degrees
str
sinh(), angles in radians
str
cosh(), angles in radians
str
tanh(), angles in radians
str
asinh(), angles in radians
str
acosh(), angles in radians
str
atanh(), angles in radians
str
log base e
str
log base 10
str
e to the something
str
10 to the something
str
OperationRound.
See also: vips_round().
round to nearest
str
the smallest integral value not less than
str
largest integral value not greater than
str
OperationComplex.
See also: vips_complex().
convert to polar coordinates
str
convert to rectangular coordinates
str
complex conjugate
str
OperationComplexget.
See also: vips_complexget().
get real component
str
get imaginary component
str
Combine.
How to combine values. See vips_compass(), for example.
take the maximum of the possible values
str
sum all the values
str
take the minimum value
str
Access.
The type of access an operation has to supply. See vips_tilecache() and #VipsForeign.
@VIPS_ACCESS_RANDOM means requests can come in any order.
@VIPS_ACCESS_SEQUENTIAL means requests will be top-to-bottom, but with some amount of buffering behind the read point for small non-local accesses.
can read anywhere
str
top-to-bottom reading only, but with a small buffer
str
Extend.
See vips_embed(), vips_conv(), vips_affine() and so on.
When the edges of an image are extended, you can specify how you want the extension done.
#VIPS_EXTEND_BLACK — new pixels are black, ie. all bits are zero.
#VIPS_EXTEND_COPY — each new pixel takes the value of the nearest edge pixel
#VIPS_EXTEND_REPEAT — the image is tiled to fill the new area
#VIPS_EXTEND_MIRROR — the image is reflected and tiled to reduce hash edges
#VIPS_EXTEND_WHITE — new pixels are white, ie. all bits are set
#VIPS_EXTEND_BACKGROUND — colour set from the @background property
We have to specify the exact value of each enum member since we have to keep these frozen for back compat with vips7.
See also: vips_embed().
extend with black (all 0) pixels
str
copy the image edges
str
repeat the whole image
str
mirror the whole image
str
extend with white (all bits set) pixels
str
extend with colour from the @background property
str
CompassDirection.
A direction on a compass. Used for vips_gravity(), for example.
centre
str
north
str
east
str
south
str
west
str
north-east
str
south-east
str
south-west
str
north-west
str
Direction.
See vips_flip(), vips_join() and so on.
Operations like vips_flip() need to be told whether to flip left-right or top-bottom.
See also: vips_flip(), vips_join().
left-right
str
top-bottom
str
Align.
See vips_join() and so on.
Operations like vips_join() need to be told whether to align images on the low or high coordinate edge, or centre.
See also: vips_join().
align low coordinate edge
str
align centre
str
align high coordinate edge
str
Interesting.
Pick the algorithm vips uses to decide image “interestingness”. This is used by vips_smartcrop(), for example, to decide what parts of the image to keep.
#VIPS_INTERESTING_NONE and #VIPS_INTERESTING_LOW mean the same – the crop is positioned at the top or left. #VIPS_INTERESTING_HIGH positions at the bottom or right.
See also: vips_smartcrop().
do nothing
str
just take the centre
str
use an entropy measure
str
look for features likely to draw human attention
str
position the crop towards the low coordinate
str
position the crop towards the high coordinate
str
everything is interesting
str
Angle.
See vips_rot() and so on.
Fixed rotate angles.
See also: vips_rot().
no rotate
str
90 degrees clockwise
str
180 degree rotate
str
90 degrees anti-clockwise
str
Angle45.
See vips_rot45() and so on.
Fixed rotate angles.
See also: vips_rot45().
no rotate
str
45 degrees clockwise
str
90 degrees clockwise
str
135 degrees clockwise
str
180 degrees
str
135 degrees anti-clockwise
str
90 degrees anti-clockwise
str
45 degrees anti-clockwise
str
Precision.
How accurate an operation should be.
int everywhere
str
float everywhere
str
approximate integer output
str
FailOn.
How sensitive loaders are to errors, from never stop (very insensitive), to stop on the smallest warning (very sensitive).
Each one implies the ones before it, so #VIPS_FAIL_ON_ERROR implies #VIPS_FAIL_ON_TRUNCATED.
never stop
str
stop on image truncated, nothing else
str
stop on serious error or truncation
str
stop on anything, even warnings
str
ForeignPpmFormat.
The netpbm file format to save as.
#VIPS_FOREIGN_PPM_FORMAT_PBM images are single bit.
#VIPS_FOREIGN_PPM_FORMAT_PGM images are 8, 16, or 32-bits, one band.
#VIPS_FOREIGN_PPM_FORMAT_PPM images are 8, 16, or 32-bits, three bands.
#VIPS_FOREIGN_PPM_FORMAT_PFM images are 32-bit float pixels.
portable bitmap
str
portable greymap
str
portable pixmap
str
portable float map
str
ForeignSubsample.
Set subsampling mode.
prevent subsampling when quality >= 90
str
always perform subsampling
str
never perform subsampling
str
ForeignDzLayout.
What directory layout and metadata standard to use.
use DeepZoom directory layout
str
use Zoomify directory layout
str
use Google maps directory layout
str
use IIIF v2 directory layout
str
use IIIF v3 directory layout
str
ForeignDzDepth.
How many pyramid layers to create.
create layers down to 1x1 pixel
str
create layers down to 1x1 tile
str
only create a single layer
str
ForeignDzContainer.
How many pyramid layers to create.
write tiles to the filesystem
str
write tiles to a zip file
str
write to a szi file
str
RegionShrink.
How to calculate the output pixels when shrinking a 2x2 region.
use the average
str
use the median
str
use the mode
str
use the maximum
str
use the minimum
str
use the top-left pixel
str
ForeignWebpPreset.
Tune lossy encoder settings for different image types.
default preset
str
digital picture, like portrait, inner shot
str
outdoor photograph, with natural lighting
str
hand or line drawing, with high-contrast details
str
small-sized colorful images
str
text-like
str
ForeignTiffCompression.
The compression types supported by the tiff writer.
Use @Q to set the jpeg compression level, default 75.
Use @predictor to set the lzw or deflate prediction, default horizontal.
Use @lossless to set WEBP lossless compression.
Use @level to set webp and zstd compression level.
no compression
str
jpeg compression
str
deflate (zip) compression
str
packbits compression
str
fax4 compression
str
LZW compression
str
WEBP compression
str
ZSTD compression
str
JP2K compression
str
ForeignTiffPredictor.
The predictor can help deflate and lzw compression. The values are fixed by the tiff library.
no prediction
str
horizontal differencing
str
float predictor
str
ForeignTiffResunit.
Use inches or centimeters as the resolution unit for a tiff file.
use centimeters
str
use inches
str
ForeignHeifCompression.
The compression format to use inside a HEIF container.
This is assumed to use the same numbering as %heif_compression_format.
x265
str
x264
str
jpeg
str
aom
str
Size.
Controls whether an operation should upsize, downsize, both up and downsize, or force a size.
See also: vips_thumbnail().
size both up and down
str
only upsize
str
only downsize
str
force size, that is, break aspect ratio
str
Intent.
The rendering intent. #VIPS_INTENT_ABSOLUTE is best for scientific work, #VIPS_INTENT_RELATIVE is usually best for accurate communication with other imaging libraries.
perceptual rendering intent
str
relative colorimetric rendering intent
str
saturation rendering intent
str
absolute colorimetric rendering intent
str
Kernel.
The resampling kernels vips supports. See vips_reduce(), for example.
The nearest pixel to the point.
str
Convolve with a triangle filter.
str
Convolve with a cubic filter.
str
Convolve with a Mitchell kernel.
str
Convolve with a two-lobe Lanczos kernel.
str
Convolve with a three-lobe Lanczos kernel.
str
PCS.
Pick a Profile Connection Space for vips_icc_import() and vips_icc_export(). LAB is usually best, XYZ can be more convenient in some cases.
use CIELAB D65 as the Profile Connection Space
str
use XYZ as the Profile Connection Space
str
OperationMorphology.
More like hit-miss, really.
See also: vips_morph().
true if all set
str
true if one set
str
CombineMode.
See vips_draw_image() and so on.
Operations like vips_draw_image() need to be told how to combine images from two sources.
See also: vips_join().
set pixels to the new value
str
add pixels
str
Token.
Attributes:
Saveable.
See also: #VipsForeignSave.
1 band (eg. CSV)
str
1 or 3 bands (eg. PPM)
str
1, 2, 3 or 4 bands (eg. PNG)
str
3 or 4 bands (eg. WEBP)
str
1, 3 or 4 bands (eg. JPEG)
str
any number of bands (eg. TIFF)
str
ImageType.
Attributes:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4