The SEDRIS Data Representation Model
APPENDIX D - Functions
SE RGBtoYIQ
extern SE_DRM_Status_Code
SE_RGBtoYIQ
(
constSE_RGB_Data *original_colour_ptr, (notes)
SE_YIQ_Data *new_colour_ptr (notes)
);

Definition

This function converts an RGB colour value to a YIQ colour value.

The colour 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_DRM_STAT_CODE_SUCCESS and *new_colour_ptr is set appropriately, if valid parameters were passed in.
SE_DRM_STAT_CODE_NULL_REQUIRED_PARAMETER and no changes are made, if any parameter was NULL.


Parameters Notes


original_colour_ptr

 a pointer to the incoming RGB colour

new_colour_ptr

 a pointer to where the converted YIQ colour will be
    stored


Prev: SE_RGBtoHLS. Next: SE_SRFInfoEqual. Up:Index.

Last updated: July 16, 2004 Copyright © 2004 SEDRIS