Color Space Changing Filter

Filter

RIF_IMAGE_FILTER_COLOR_SPACE

Description

Changes image colors from one color space to another color space.

Parameters

Parameter

Type

Input/Output

Description

srcColorSpace

uint

input

The color space of the source image.
Currently supported:

  • RIF_COLOR_SPACE_SRGB (default)

  • RIF_COLOR_SPACE_ADOBE_RGB

  • RIF_COLOR_SPACE_REC2020

  • RIF_COLOR_SPACE_DCI

dstColorSpace

uint

input

The color space of the destination image.
Currently supported:

  • RIF_COLOR_SPACE_SRGB (default)

  • RIF_COLOR_SPACE_ADOBE_RGB

  • RIF_COLOR_SPACE_REC2020

  • RIF_COLOR_SPACE_DCI

Usage Example

rif_image_filter filter = nullptr;
rifContextCreateImageFilter(context, RIF_IMAGE_FILTER_COLOR_SPACE, &filter);
rifImageFilterSetParameter1u(filter, "srcColorSpace", RIF_COLOR_SPACE_SRGB);
rifImageFilterSetParameter1u(filter, "dstColorSpace", RIF_COLOR_SPACE_DCIP3);
rifCommandQueueAttachImageFilter(queue, filter, inputImage, outputImage);
rifContextExecuteCommandQueue(context, queue, nullptr, nullptr, nullptr);

Results

Rec2020 to Rec2020

SRGB to Adobe RGB

SRGB to Rec2020

SRGB to DCIP3