YCCKToCMYK_JPEG

Convert YCCK to CMYK (JPEG)

Supported Technologies

SSE2

Synopsis

FwStatus   fwiYCCKToCMYK_JPEG_8u_P4R ( const Fw8u * const pSrcYCCK[4]int srcStepFw8u * pDstCMYK[4]int dstStepFwiSize roiSize );
FwStatus   fwiYCCKToCMYK_JPEG_8u_P4C4R ( const Fw8u * const pSrcYCCK[4]int srcStepFw8u * pDstCMYKint dstStepFwiSize roiSize );

Parameters

dstStep   Destination buffer step size (width of the buffer in bytes).
pDstCMYK   Pointer to destination image ROI for CMYK image format.
pDstCMYK[4]   Pointer to destination image ROI for CMYK image format (four-channel planar).
pSrcYCCK[4]   Pointer to source image ROI for YCCK image format (four-channel planar).
roiSize   Specifies the height and width of an ROI.
srcStep   Source buffer step size (width of the buffer in bytes).

Description

These function step through an ROI in a source buffer, convert source data from the YCCK color space to the CMYK color model, and write the converted data to a destination buffer.

The following formulas are used to convert luminance and chrominance values to red, green, and blue values.

 R = Y + 1.402*Cr - 179.456
 G = Y - 0.34414*Cb - 0.71414*Cr + 135.45984
 B = Y + 1.772*Cb - 226.816

The following formulas are used to convert red, green, and blue values to cyan, magenta, and yellow values.

 C = 255 -R
 M = 255 -G
 Y = 255 -B

The black (K) channel value remains the same during conversion.