'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_VideoColorCMYK2JFIFYCCK444 3MLIB "23 May 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_VideoColorCMYK2JFIFYCCK444 \- CMYK to JFIF YCbCr color conversion .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_VideoColorCMYK2JFIFYCCK444\fR(\fBmlib_u8 *\fR\fIy\fR, \fBmlib_u8 *\fR\fIcb\fR, \fBmlib_u8 *\fR\fIcr\fR, \fBmlib_u8 *\fR\fIk\fR, \fBconst mlib_u8 *\fR\fIcmyk\fR, \fBmlib_s32\fR \fIn\fR); .fi .SH DESCRIPTION .sp .LP The \fBmlib_VideoColorCMYK2JFIFYCCK444()\fR function performs color space conversion from CMYK to YCbCrK when used in the JPEG File Interchange Format (JFIF). .sp .LP The following equation is used: .sp .in +2 .nf R = (255 - C) G = (255 - M) B = (255 - Y) Y = 0.29900 * R + 0.58700 * G + 0.11400 * B Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + 128 Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + 128 K = K .fi .in -2 .SH PARAMETERS .sp .LP The function takes the following arguments: .sp .ne 2 .mk .na \fB\fIy\fR\fR .ad .RS 8n .rt Pointer to destination Y component row. y must be 8-byte aligned. .RE .sp .ne 2 .mk .na \fB\fIcb\fR\fR .ad .RS 8n .rt Pointer to destination Cb component row. cb must be 8-byte aligned. .RE .sp .ne 2 .mk .na \fB\fIcr\fR\fR .ad .RS 8n .rt Pointer to destination Cr component row. cr must be 8-byte aligned. .RE .sp .ne 2 .mk .na \fB\fIk\fR\fR .ad .RS 8n .rt Pointer to destination K component row. k must be 8-byte aligned. .RE .sp .ne 2 .mk .na \fB\fIcmyk\fR\fR .ad .RS 8n .rt Pointer to source CMYK multi-component row. cmyk must be 8-byte aligned. .RE .sp .ne 2 .mk .na \fB\fIn\fR\fR .ad .RS 8n .rt Length of Y,Cb,Cr, and K component rows. The length of the CMYK multi-component row must be 4*n. .RE .SH RETURN VALUES .sp .LP The function returns \fBMLIB_SUCCESS\fR if successful. Otherwise it returns \fBMLIB_FAILURE\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBmlib_VideoColorJFIFYCCK2CMYK444\fR(3MLIB), \fBattributes\fR(5)