📄 cmscam97.c
字号:
//// Little cms// Copyright (C) 1998-2005 Marti Maria//// Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the Software // is furnished to do so, subject to the following conditions://// The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software.//// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.#include "lcms.h"/*typedef struct { double J; double C; double h; } cmsJCh, FAR* LPcmsJCh;#define AVG_SURROUND_4 0#define AVG_SURROUND 1#define DIM_SURROUND 2#define DARK_SURROUND 3#define CUTSHEET_SURROUND 4typedef struct { cmsCIEXYZ whitePoint; double Yb; double La; int surround; double D_value; } cmsViewingConditions, FAR* LPcmsViewingConditions;LCMSAPI LCMSHANDLE LCMSEXPORT cmsCIECAM97sInit(LPcmsViewingConditions pVC);LCMSAPI void LCMSEXPORT cmsCIECAM97sDone(LCMSHANDLE hModel);LCMSAPI void LCMSEXPORT cmsCIECAM97sForward(LCMSHANDLE hModel, LPcmsCIEXYZ pIn, LPcmsJCh pOut);LCMSAPI void LCMSEXPORT cmsCIECAM97sReverse(LCMSHANDLE hModel, LPcmsJCh pIn, LPcmsCIEXYZ pOut);*/// ---------- Implementation --------------------------------------------// #define USE_CIECAM97s2 1#ifdef USE_CIECAM97s2# define NOISE_CONSTANT 3.05 #else# define NOISE_CONSTANT 2.05#endif/* The model input data are the adapting field luminance in cd/m2 (normally taken to be 20% of the luminance of white in the adapting field), LA , the relative tristimulus values of the stimulus, XYZ, the relative tristimulus values of white in the same viewing conditions, Xw Yw Zw , and the relative luminance of the background, Yb . Relative tristimulus values should be expressed on a scale from Y = 0 for a perfect black to Y = 100 for a perfect reflecting diffuser. Additionally, the parameters c, for the impact of surround, Nc , a chromatic induction factor, and F, a factor for degree of adaptation, must be selected according to the guidelines in table All CIE tristimulus values are obtained using the CIE 1931 Standard Colorimetric Observer (2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -