int
vips_switch (
VipsImage** tests,
VipsImage** out,
int n,
...
)
Description [src]
The tests
images are evaluated and at each point the index of the first non-zero value is written to out
. If all tests
are false, the value (n
+ 1) is written.
Images in tests
must have one band. They are expanded to the bounding box of the set of images in tests
, and that size is used for out
. tests
can have up to 255 elements.
Combine with vips_case()
to make an efficient multi-way vips_ifthenelse()
.
This function is not directly available to language bindings.
Parameterstests
Type: An array of VipsImage*
Test these images.
The length of the array is specified in then
argument. The data is owned by the caller of the function.
out
Type: VipsImage
Output index image.
The argument will be set by the function. The caller of the function takes ownership of the returned data, and is responsible for freeing it.n
Type: int
Number of input images.
...
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