Function

Vipscheck_bands_1orn_unary

Declaration [src]

int
vips_check_bands_1orn_unary (
  const char* domain,
  VipsImage* im,
  int n
)

Description [src]

Check that an image has 1 or n bands. Handy for unary operations, cf. vips_check_bands_1orn(). If not, set an error message and return non-zero.

Parameters

domain

Type: const char*

The originating domain for the error message.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
im

Type: VipsImage

Image to check.

The data is owned by the caller of the function.
n

Type: int

Number of bands, or 1.

Return value

Type: int

0 on OK, or -1 on error.