CMYKToYCCK_JPEG

Converts a CMYK image to the YCCK color model.

Syntax

Case 1: Operation on planar data

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

Case 2: Operation on pixel-order data

IppStatus ippiCMYKToYCCK_JPEG_8u_C4P4R(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[4], int dstStep, IppiSizeroiSize);

Parameters

pSrc

Array of pointers to the ROI in the separate planes for the planar source image. Pointer to ROI in the pixel-order source image.

srcStep

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

pDst

Array of pointers to the ROI in the destination 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 ippiCMYKToYCCK_JPEG is declared in the ippj.h file. It operates with ROI (see Regions of Interest in Intel IPP).

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

R = 255 - C

G = 255 - M

B = 255 - Y

After that, conversion to YCCK image is performed as:

Y = 0.299*R + 0.587*G + 0.114*B

Cb = -0.16874*R - 0.33126*G + 0.5*B + 128

Cr = 0.5*R - 0.41869*G - 0.08131*B + 128

The values of K channel are written without modification.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition if one of 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.