Function

Vipscheck_format

Declaration [src]

int
vips_check_format (
  const char* domain,
  VipsImage* im,
  VipsBandFormat fmt
)

Description [src]

Check that the image has the specified format. Otherwise set an error message and return non-zero.

See also: vips_error().

Parameters

domain 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 VipsImage
 

Image to check.

 The data is owned by the caller of the function.
fmt VipsBandFormat
 

Format to test for.

Return value

Returns: int
 

0 if OK, -1 otherwise.