The SEDRIS Data Representation Model
APPENDIX D - Functions
SE CMYKtoCMY
extern SE_DRM_Status_Code
SE_CMYKtoCMY
(
constSE_CMYK_Data *original_colour_ptr,1
SE_CMY_Data *new_colour_ptr2
);

Definition

This function converts a CMYK colour value to a CMY colour value.

The colour model conversion algorithm is based on the algorithm published in section 13.3.2, "The CMY 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.

Incoming data values are expected to be between 0.0 and 1.0, inclusive. Furthermore, after adding the incoming Black value to the incoming Cyan, Magenta, and Yellow values, all results are expected to be between 0.0 and 1.0, inclusive. Note that no checking of parameters or results will be made by this function. This function will not clamp a result even if the result is greater than 1.0. This function simply performs the arithmetic of the following algorithm:
Cyan =incoming Cyan + incoming Black
Magenta =incoming Magenta + incoming Black
Yellow =incoming Yellow + incoming Black


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 *new_colour_ptr is left unchanged, if any parameter was NULL.

Parameters Notes

1 a pointer to the incoming CMYK colour

2 a pointer to where the converted CMY colour will be stored


Prev: SE_AllocCharacterArray. Next: SE_CMYtoCMYK. Up:Index.

Last updated: July 26, 2006 Copyright © 2006 SEDRIS