Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/share/gtk-doc/html/libvips/ drwxr-xr-x | |
| Viewing file: Select action/file-type:
FunctionsTypes and Values
DescriptionThese operations perform pixel arithmetic, that is, they perform an arithmetic operation, such as addition, on every pixel in an image or a pair of images. All (except in a few cases noted below) will work with images of any type or any mixture of types, of any size and of any number of bands. For binary operations, if the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. In the same way, for operations that take an array constant, such as
Arithmetic operations try to preserve precision by increasing the number of
bits in the output image when necessary. Generally, this follows the ANSI C
conventions for type promotion, so multiplying two
VIPS_FORMAT_UCHAR images together, for example, produces a
VIPS_FORMAT_USHORT image, and taking the For binary arithmetic operations, type promotion occurs in two stages. First, the two input images are cast up to the smallest common format, that is, the type with the smallest range that can represent the full range of both inputs. This conversion can be represented as a table: Table 3. Smallest common format
In the second stage, the operation is performed between the two identical types to form the output. The details vary between operations, but generally the principle is that the output type should be large enough to represent the whole range of possible values, except that int never becomes float. Functionsvips_add ()int vips_add ( This operation calculates If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right. If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then thefollowing table is used to determine the output type: Table 4. VipsAdd type promotion
In other words, the output type is just large enough to hold the whole range of possible values. Operations on integer images are performed using the processor's vector unit, if possible. Disable this with --vips-novector or IM_NOVECTOR. See also: vips_sum ()int vips_sum ( This operation sums all images in If the images differ in size, the smaller images are enlarged to match the largest by adding zero pixels along the bottom and right. If the number of bands differs, all but one of the images must have one band. In this case, n-band images are formed from the one-band images by joining n copies of the one-band images together, and then the n-band images are operated upon. The input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then thefollowing table is used to determine the output type: Table 5. VipsSum type promotion
In other words, the output type is just large enough to hold the whole range of possible values. See also: vips_subtract ()int vips_subtract ( This operation calculates If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right. If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then thefollowing table is used to determine the output type: Table 6. VipsSubtract type promotion
In other words, the output type is just large enough to hold the whole range of possible values. See also: vips_multiply ()int vips_multiply ( This operation calculates If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right. If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then thefollowing table is used to determine the output type: Table 7. VipsMultiply type promotion
In other words, the output type is just large enough to hold the whole range of possible values. See also: vips_divide ()int vips_divide ( This operation calculates If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right. If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then thefollowing table is used to determine the output type: Table 8.
In other words, the output type is just large enough to hold the whole range of possible values. See also: vips_linear ()int vips_linear ( Optional arguments:
Pass an image through a linear transform, ie. ( If the arrays of constants have just one element, that constant is used for all image bands. If the arrays have more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element. See also: [method] vips_linear1 ()int vips_linear1 ( Optional arguments:
Run See also: [method] vips_remainder ()int vips_remainder ( This operation calculates If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right. If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), and that format is theresult type. See also: vips_remainder_const ()int vips_remainder_const ( This operation calculates If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element. See also: [method] vips_remainder_const1 ()int vips_remainder_const1 ( This operation calculates If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element. See also: [method] vips_invert ()int vips_invert ( For unsigned formats, this operation calculates (max - For complex images, only the real part is inverted. See also See also: [method] vips_abs ()int vips_abs ( This operation finds the absolute value of an image. It does a copy for
unsigned integer types, negate for negative values in
signed integer types, See also: [method] vips_sign ()int vips_sign ( Finds the unit vector in the direction of the pixel value. For non-complex images, it returns a signed char image with values -1, 0, and 1 for negative, zero and positive pixels. For complex images, it returns a complex normalised to length 1. See also: [method] vips_round ()int vips_round ( Round to an integral value. Copy for integer types, round float and complex types. The format of See also: [method] Parameters
vips_floor ()int vips_floor ( Round to an integral value with VIPS_OPERATION_ROUND_FLOOR. See
[method] vips_ceil ()int vips_ceil ( Round to an integral value with VIPS_OPERATION_ROUND_CEIL. See
[method] vips_rint ()int vips_rint ( Round to an integral value with VIPS_OPERATION_ROUND_RINT. See
[method] vips_math ()int vips_math ( Perform various functions in -lm, the maths library, on images. Angles are expressed in degrees. The output type is float unless the input is double, in which case the output is double. Non-complex images only. See also: [method] vips_sin ()int vips_sin ( Perform VIPS_OPERATION_MATH_SIN on an image. See [method] vips_cos ()int vips_cos ( Perform VIPS_OPERATION_MATH_COS on an image. See [method] vips_tan ()int vips_tan ( Perform VIPS_OPERATION_MATH_TAN on an image. See [method] vips_asin ()int vips_asin ( Perform VIPS_OPERATION_MATH_ASIN on an image. See [method] vips_acos ()int vips_acos ( Perform VIPS_OPERATION_MATH_ACOS on an image. See [method] vips_atan ()int vips_atan ( Perform VIPS_OPERATION_MATH_ATAN on an image. See [method] vips_exp ()int vips_exp ( Perform VIPS_OPERATION_MATH_EXP on an image. See [method] vips_exp10 ()int vips_exp10 ( Perform VIPS_OPERATION_MATH_EXP10 on an image. See [method] vips_log ()int vips_log ( Perform VIPS_OPERATION_MATH_LOG on an image. See [method] vips_log10 ()int vips_log10 ( Perform VIPS_OPERATION_MATH_LOG10 on an image. See [method] vips_complex ()int vips_complex ( Perform various operations on complex images. Angles are expressed in degrees. The output type is complex unless the input is double or dpcomplex, in which case the output is dpcomplex. [method] vips_polar ()int vips_polar ( Perform VIPS_OPERATION_COMPLEX_POLAR on an image. See [method] vips_rect ()int vips_rect ( Perform VIPS_OPERATION_COMPLEX_RECT on an image. See [method] vips_conj ()int vips_conj ( Perform VIPS_OPERATION_COMPLEX_CONJ on an image. See [method] vips_complex2 ()int vips_complex2 ( Perform various binary operations on complex images. Angles are expressed in degrees. The output type is complex unless the input is double or dpcomplex, in which case the output is dpcomplex. vips_cross_phase ()int vips_cross_phase ( Perform VIPS_OPERATION_COMPLEX2_CROSS_PHASE on an image.
See vips_complexget ()int vips_complexget ( Get components of complex images. The output type is the same as the input type, except VIPS_FORMAT_COMPLEX becomes VIPS_FORMAT_FLOAT and VIPS_FORMAT_DPCOMPLEX becomes VIPS_FORMAT_DOUBLE. [method] vips_real ()int vips_real ( Perform VIPS_OPERATION_COMPLEXGET_REAL on an image. See [method] vips_imag ()int vips_imag ( Perform VIPS_OPERATION_COMPLEXGET_IMAG on an image. See [method] vips_complexform ()int vips_complexform ( Compose two real images to make a complex image. If either If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. See also: vips_relational ()int vips_relational ( Perform various relational operations on pairs of images. The output type is always uchar, with 0 for FALSE and 255 for TRUE. Less-than and greater-than for complex images compare the modulus. If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right. If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic).To decide if pixels match exactly, that is have the same value in every
band, use See also: vips_equal ()int vips_equal ( Perform VIPS_OPERATION_RELATIONAL_EQUAL on a pair of images. See
vips_notequal ()int vips_notequal ( Perform VIPS_OPERATION_RELATIONAL_NOTEQ on a pair of images. See
vips_less ()int vips_less ( Perform VIPS_OPERATION_RELATIONAL_LESS on a pair of images. See
vips_lesseq ()int vips_lesseq ( Perform VIPS_OPERATION_RELATIONAL_LESSEQ on a pair of images. See
vips_more ()int vips_more ( Perform VIPS_OPERATION_RELATIONAL_MORE on a pair of images. See
vips_moreeq ()int vips_moreeq ( Perform VIPS_OPERATION_RELATIONAL_MOREEQ on a pair of images. See
vips_relational_const ()int vips_relational_const ( Perform various relational operations on an image and an array of constants. The output type is always uchar, with 0 for FALSE and 255 for TRUE. If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element. See also: [method] vips_equal_const ()int vips_equal_const ( Perform VIPS_OPERATION_RELATIONAL_EQUAL on an image and a constant. See
[method] vips_notequal_const ()int vips_notequal_const ( Perform VIPS_OPERATION_RELATIONAL_NOTEQ on an image and a constant. See
[method] vips_less_const ()int vips_less_const ( Perform VIPS_OPERATION_RELATIONAL_LESS on an image and a constant. See
[method] vips_lesseq_const ()int vips_lesseq_const ( Perform VIPS_OPERATION_RELATIONAL_LESSEQ on an image and a constant. See
[method] vips_more_const ()int vips_more_const ( Perform VIPS_OPERATION_RELATIONAL_MORE on an image and a constant. See
[method] vips_moreeq_const ()int vips_moreeq_const ( Perform VIPS_OPERATION_RELATIONAL_MOREEQ on an image and a constant. See
[method] vips_relational_const1 ()int vips_relational_const1 ( Perform various relational operations on an image and a constant. See
See also: [method] vips_equal_const1 ()int vips_equal_const1 ( Perform VIPS_OPERATION_RELATIONAL_EQUAL on an image and a constant. See
[method] vips_notequal_const1 ()int vips_notequal_const1 ( Perform VIPS_OPERATION_RELATIONAL_NOTEQ on an image and a constant. See
[method] vips_less_const1 ()int vips_less_const1 ( Perform VIPS_OPERATION_RELATIONAL_LESS on an image and a constant. See
[method] vips_lesseq_const1 ()int vips_lesseq_const1 ( Perform VIPS_OPERATION_RELATIONAL_LESSEQ on an image and a constant. See
[method] vips_more_const1 ()int vips_more_const1 ( Perform VIPS_OPERATION_RELATIONAL_MORE on an image and a constant. See
[method] vips_moreeq_const1 ()int vips_moreeq_const1 ( Perform VIPS_OPERATION_RELATIONAL_MOREEQ on an image and a constant. See
[method] vips_boolean ()int vips_boolean ( Perform various boolean operations on pairs of images. The output image is the same format as the upcast input images for integer types. Float types are cast to int before processing. Complex types are not supported. If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right. If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic).See also: vips_andimage ()int vips_andimage ( Perform VIPS_OPERATION_BOOLEAN_AND on a pair of images. See
vips_orimage ()int vips_orimage ( Perform VIPS_OPERATION_BOOLEAN_OR on a pair of images. See
vips_eorimage ()int vips_eorimage ( Perform VIPS_OPERATION_BOOLEAN_EOR on a pair of images. See
vips_lshift ()int vips_lshift ( Perform VIPS_OPERATION_BOOLEAN_LSHIFT on a pair of images. See
vips_rshift ()int vips_rshift ( Perform VIPS_OPERATION_BOOLEAN_RSHIFT on a pair of images. See
vips_boolean_const ()int vips_boolean_const ( Perform various boolean operations on an image against an array of constants. The output type is always uchar, with 0 for FALSE and 255 for TRUE. If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element. See also: [method] vips_andimage_const ()int vips_andimage_const ( Perform VIPS_OPERATION_BOOLEAN_AND on an image and an array of constants.
See See also: [method] vips_orimage_const ()int vips_orimage_const ( Perform VIPS_OPERATION_BOOLEAN_OR on an image and an array of constants.
See See also: [method] vips_eorimage_const ()int vips_eorimage_const ( Perform VIPS_OPERATION_BOOLEAN_EOR on an image and an array of constants.
See See also: [method] vips_lshift_const ()int vips_lshift_const ( Perform VIPS_OPERATION_BOOLEAN_LSHIFT on an image and an array of constants.
See See also: [method] vips_rshift_const ()int vips_rshift_const ( Perform VIPS_OPERATION_BOOLEAN_LSHIFT on an image and an array of constants.
See See also: [method] vips_boolean_const1 ()int vips_boolean_const1 ( Perform various boolean operations on an image with a single constant. See
See also: [method] vips_andimage_const1 ()int vips_andimage_const1 ( Perform VIPS_OPERATION_BOOLEAN_AND on an image and a constant.
See See also: [method] vips_orimage_const1 ()int vips_orimage_const1 ( Perform VIPS_OPERATION_BOOLEAN_OR on an image and a constant.
See See also: [method] vips_eorimage_const1 ()int vips_eorimage_const1 ( Perform VIPS_OPERATION_BOOLEAN_EOR on an image and a constant.
See See also: [method] vips_lshift_const1 ()int vips_lshift_const1 ( Perform VIPS_OPERATION_BOOLEAN_LSHIFT on an image and a constant.
See See also: [method] vips_rshift_const1 ()int vips_rshift_const1 ( Perform VIPS_OPERATION_BOOLEAN_RSHIFT on an image and a constant.
See See also: [method] vips_math2 ()int vips_math2 ( This operation calculates a 2-ary maths operation on a pair of images
and writes the result to It detects division by zero, setting those pixels to zero in the output. Beware: it does this silently! If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right. If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon. The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), and that format is theresult type. See also: vips_pow ()int vips_pow ( Perform VIPS_OPERATION_MATH2_POW on a pair of images. See
vips_wop ()int vips_wop ( Perform VIPS_OPERATION_MATH2_WOP on a pair of images. See
vips_math2_const ()int vips_math2_const ( This operation calculates various 2-ary maths operations on an image and
an array of constants and writes the result to It detects division by zero, setting those pixels to zero in the output. Beware: it does this silently! If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element. See also: [method] vips_pow_const ()int vips_pow_const ( Perform VIPS_OPERATION_MATH2_POW on an image and a constant. See
[method] vips_wop_const ()int vips_wop_const ( Perform VIPS_OPERATION_MATH2_WOP on an image and a constant. See
[method] vips_math2_const1 ()int vips_math2_const1 ( This operation calculates various 2-ary maths operations on an image and
a constant. See [method] vips_pow_const1 ()int vips_pow_const1 ( Perform VIPS_OPERATION_MATH2_POW on an image and a constant. See
[method] vips_wop_const1 ()int vips_wop_const1 ( Perform VIPS_OPERATION_MATH2_WOP on an image and a constant. See
[method] vips_avg ()int vips_avg ( This operation finds the average value in an image. It operates on all
bands of the input image: use See also: [method] Parameters
vips_deviate ()int vips_deviate ( This operation finds the standard deviation of all pixels in Non-complex images only. See also: [method] Parameters
vips_min ()int vips_min ( Optional arguments:
This operation finds the minimum value in an image. By default it finds the single smallest value. If It operates on all
bands of the input image: use For complex images, this operation finds the minimum modulus. You can read out the position of the minimum with If there are more than See also: [method] Parameters
vips_max ()int vips_max ( Optional arguments:
This operation finds the maximum value in an image. By default it finds the single largest value. If It operates on all
bands of the input image: use For complex images, this operation finds the maximum modulus. You can read out the position of the maximum with If there are more than See also: [method] Parameters
vips_stats ()int vips_stats ( Find many image statistics in a single pass through the data. Row 0 has statistics for all bands together, row 1 has stats for band 1, and so on. If there is more than one maxima or minima, one of them will be chosen at random. See also: [method] vips_measure ()int vips_measure ( Optional arguments:
Analyse a grid of colour patches, producing an array of patch averages. The mask has a row for each measured patch and a column for each image band. The operations issues a warning if any patch has a deviation more than 20% of the mean. Only the central 50% of each patch is averaged. If the chart does not fill the whole image, use the optional See also: [method] vips_find_trim ()int vips_find_trim ( Optional arguments:
Search Any alpha is flattened out, then the image is median-filtered, all the row
and column sums of the absolute
difference from If the image is entirely background,
The image needs to be at least 3x3 pixels in size. See also: [method] vips_getpoint ()int vips_getpoint ( Reads a single pixel on an image. The pixel values are returned in See also: [method] vips_hist_find ()int vips_hist_find ( Optional arguments:
Find the histogram of
See also: [method] vips_hist_find_ndim ()int vips_hist_find_ndim ( Optional arguments:
Make a one, two or three dimensional histogram of a 1, 2 or
3 band image. Divide each axis into Images are cast to uchar or ushort before histogramming. See also: [method] vips_hist_find_indexed ()int vips_hist_find_indexed ( Optional arguments:
Make a histogram of
Normally, bins are summed, but you can use This operation is useful in conjunction with See also: [method] vips_hough_line ()int vips_hough_line ( Optional arguments:
Find the line Hough transform for Use See also: [method] vips_hough_circle ()int vips_hough_circle ( Optional arguments:
Find the circular Hough transform of an image. Use Use See also: [method] vips_project ()int vips_project ( Find the horizontal and vertical projections of an image, ie. the sum of every row of pixels, and the sum of every column of pixels. The output format is uint, int or double, depending on the input format. Non-complex images only. See also: [method] vips_profile ()int vips_profile ( vips_profile() searches inward from the edge of See also: [method] Types and Valuesenum VipsOperationMathSee also: |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0071 ]-- |