YCCKToCMYK_JPEG

Converts an YCCK image to the CMYK color model.

Syntax

IppStatus ippiYCCKToCMYK_JPEG_8u_P4R(const Ipp8u* pSrc[4], int srcStep , Ipp8u* pDst[4], int dstStep, IppiSize roiSize);

IppStatus ippiYCCKToCMYK_JPEG_8u_P4C4R(const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize);

Parameters

pSrc

Array of pointers to the ROI in each plane of the source image.

srcStep

Distance in bytes between starts of consecutive lines in the source image.

pDst

Array of pointers to the ROI in each planes of the destination planar image. Pointer to the ROI in the destination pixel-order image.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

roiSize

Size of the source and destination ROI in pixels.

Description

The function ippiYCCKToCMYK_JPEG is declared in the ippj.h file. It operates with ROI (see Regions of Interest in Intel IPP).

This function converts an YCCK image to the CMYK image in two steps. First, conversion is done into RGB format as:

R = Y + 1.402*Cr - 179.456

G = Y - 0.34414*Cb - 0.71414*Cr + 135.45984

B = Y + 1.772*Cb - 226.816

After that, conversion to CMYK image is performed as follows:

C = 255 - R

M = 255 - G

Y = 255 - B

The values of K channel are written without modification.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if any od the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or negative value.

ippStsStepErr

Indicates an error condition if srcStep or dstStep has a zero or negative value.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.