Method

VipsImagecolourspace

Declaration [src]

int
vips_colourspace (
  VipsImage* in,
  VipsImage** out,
  VipsInterpretation space,
  ...
)

Description [src]

This operation looks at the interpretation field of in (or uses source_space, if set) and runs a set of colourspace conversion functions to move it to space.

For example, given an image tagged as VipsInterpretation, running vips_colourspace() with space set to VipsInterpretation will convert with vips_Yxy2XYZ() and vips_XYZ2Lab().

::: tip “Optional arguments” * source_space: VipsInterpretation, input colour space

::: seealso vips_colourspace_issupported(), vips_image_guess_interpretation().

Parameters

out VipsImage
 

Output image.

 The argument will be set by the function.
 The instance takes ownership of the data, and is responsible for freeing it.
space VipsInterpretation
 

Convert to this colour space.

... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.