### Function

# Vips check_format_same

#### Declaration [src]

    int
    vips_check_format_same (
      const char* domain,
      VipsImage* im1,
      VipsImage* im2
    )

#### Description [src]

Check that the images have the same format. If not, set an error message and return non-zero.

See also

`vips_error()`.

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

`im1`

  Type: `VipsImage`

  First image to check.

  The data is owned by the caller of the function.

`im2`

  Type: `VipsImage`

  Second image to check.

  The data is owned by the caller of the function.

#### Return value

Type: `int`

0 if OK, -1 otherwise.