int
vips_math2 (
VipsImage* left,
VipsImage* right,
VipsImage** out,
VipsOperationMath2 math2,
...
)
Description [src]
This operation calculates a 2-ary maths operation on a pair of images and writes the result to out
. The images may have any non-complex format. out
is float except in the case that either of left
or right
are double, in which case out
is also double.
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 the result type.
This method is not directly available to language bindings.
Parametersright
Type: VipsImage
Right-hand input VipsImage
.
out
Type: VipsImage
Output VipsImage
.
math2
Type: VipsOperationMath2
Math operation to perform.
...
Type:
NULL
-terminated list of optional named arguments.
Type: int
0 on success, -1 on error.
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