Function Name: RGB to YIQ

Definition

This function converts a RGB color value to a YIQ color value.

The color model conversion algorithm is based on the algorithm published in section 13.3.3, "The YIQ Color Model" of Computer Graphics: Principles and Practice - Second Edition in C, by James D. Foley, Andries van Dam, Steven K. Feiner, and John F. Hughes, published by Addison-Wesley Publishing Company (Reprinted with corrections November 1992, November 1993, and July 1995), Copyright 1996, 1990 by Addison-Wesley Publishing Company, Inc.

Returns

SE_COLOR_SUCCESS - if valid parameters were passed in. In this case, *new_color_ptr is set to the appropriate values.

SE_COLOR_NULL_PTR_OUT_PARAMETER - if new_color_ptr was NULL.

SE_COLOR_INVALID_ORIGINAL_COLOR - if original_color_ptr is NULL. In this case, *new_color_ptr is not modified.

Prototype


extern SE_COLOR_STATUS_CODE_ENUM
SE_RGBtoYIQ
(
constSE_RGB_DATA *original_color_ptr, (notes)
SE_YIQ_DATA *new_color_ptr (notes)
);

Parameters Notes

original_color_ptr

 a pointer to the incoming RGB color

new_color_ptr

 a pointer to where the converted YIQ color will be stored

Prev: RGB to HLS. Next: SRF 2D Parameters Equal. Up:Index.