Method
VipsImagecase
Declaration [src]
int
vips_case (
VipsImage* index,
VipsImage** cases,
VipsImage** out,
int n,
...
)
Description [src]
Use values in index
to select pixels from cases
.
index
must have one band. cases
can have up to 256 elements. Values in
index
greater than or equal to n
use the final image in cases
. The
images in cases
must have either one band or the same number of bands.
The output image is the same size as index
. Images in cases
are
expanded to the smallest common format and number of bands.
Combine this with vips_switch()
to make something like a case statement or
a multi-way vips_ifthenelse().
See also: vips_maplut(), vips_switch(), vips_ifthenelse().
This method is not directly available to language bindings. |
Parameters
cases |
An array of VipsImage* |
Array of case images. |
|
The length of the array is specified in the n argument. | |
The data is owned by the caller of the function. | |
out |
VipsImage |
Output image. |
|
The argument will be set by the function. | |
The instance takes ownership of the data, and is responsible for freeing it. | |
n |
int |
Number of case images. |
|
... |
|
|