Method

VipsImagebandbool

Declaration [src]

int
vips_bandbool (
  VipsImage* in,
  VipsImage** out,
  VipsOperationBoolean boolean,
  ...
)

Description [src]

Perform various boolean operations across the bands of an image. For example, a three-band uchar image operated on with VipsOperationBoolean will produce a one-band uchar image where each pixel is the bitwise and of the band elements of the corresponding pixel in the input image.

The output image is the same format as the input image for integer types. Float types are cast to int before processing. Complex types are not supported.

The output image always has one band.

This operation is useful in conjunction with vips_relational(). You can use it to see if all image bands match exactly.

::: seealso vips_boolean_const().

Parameters

out VipsImage
 

Output VipsImage

 The argument will be set by the function.
 The instance takes ownership of the data, and is responsible for freeing it.
boolean VipsOperationBoolean
 

Boolean operation to perform.

... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.