Vips.Image.boolean

### Method

# Vips Imageboolean

#### Declaration [src]

    int
    vips_boolean (
      VipsImage* left,
      VipsImage* right,
      VipsImage** out,
      VipsOperationBoolean boolean,
      ...
    )

#### Description [src]

Perform various boolean operations on pairs of images.

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

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).

See also

`vips_boolean_const()`.

This method is not directly available to language bindings.

#### Parameters

`right`

  Type: `VipsImage`

  Right-hand input `VipsImage`.

  The data is owned by the caller of the method.

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