Vips.Image.bandbool

### Method

# Vips Imagebandbool

#### 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 `VIPS_OPERATION_BOOLEAN_AND` 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.

See also

`vips_boolean_const()`.

This method is not directly available to language bindings.

#### Parameters

`out`

  Type: `VipsImage`

  Output `VipsImage`.

  The argument will be set by the function.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.

`boolean`

  Type: `VipsOperationBoolean`

  Boolean operation to perform.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.