/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// This file is available under and governed by the GNU General Public
// License version 2 only, as published by the Free Software Foundation.
// However, the following notice accompanied the original version of this
// file:
//
//---------------------------------------------------------------------------------
//
// Little Color Management System
// Copyright (c) 1998-2012 Marti Maria Saguer
//
// 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,
// 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 "lcms2_internal.h"
// CIECAM 02 appearance model. Many thanks to Jordi Vilar for the debugging.
// ---------- Implementation --------------------------------------------
typedef struct {
cmsFloat64Number a, b, h, e, H, A, J, Q, s, t, C, M;
} CAM02COLOR;
typedef struct {
} cmsCIECAM02;
static
{
}
static
{
}
static
{
}
static
{
return FL;
}
static
{
return D;
}
static
{
return clr;
}
static
{
for (i = 0; i < 3; i++) {
}
return clr;
}
static
{
cmsFloat64Number M[9];
M[0] =(( 0.38971 * 1.096124) + (0.68898 * 0.454369) + (-0.07868 * -0.009628));
M[1] =(( 0.38971 * -0.278869) + (0.68898 * 0.473533) + (-0.07868 * -0.005698));
M[2] =(( 0.38971 * 0.182745) + (0.68898 * 0.072098) + (-0.07868 * 1.015326));
M[3] =((-0.22981 * 1.096124) + (1.18340 * 0.454369) + ( 0.04641 * -0.009628));
M[4] =((-0.22981 * -0.278869) + (1.18340 * 0.473533) + ( 0.04641 * -0.005698));
M[5] =((-0.22981 * 0.182745) + (1.18340 * 0.072098) + ( 0.04641 * 1.015326));
M[6] =(-0.009628);
M[7] =(-0.005698);
M[8] =( 1.015326);
return clr;
}
static
{
for (i = 0; i < 3; i++) {
}
else {
}
}
return clr;
}
static
{
if (a == 0) {
if (b == 0) clr.h = 0;
else if (b > 0) clr.h = 90;
else clr.h = 270;
}
else if (a > 0) {
temp = b / a;
else if (b == 0) clr.h = 0;
}
else {
temp = b / a;
}
if (clr.h < 20.14) {
}
else if (clr.h < 90.0) {
}
else if (clr.h < 164.25) {
}
else if (clr.h < 237.53) {
}
else {
}
t = (e * pow(((a * a) + (b * b)), 0.5)) /
return clr;
}
static
{
(1.0 / 0.9) );
(clr.J / 100.0),
p1 = e / t;
}
else {
}
return clr;
}
static
{
for (i = 0; i < 3; i++) {
else c1 = 1;
(1.0 / 0.42));
}
return clr;
}
static
{
cmsFloat64Number M[9];
M[0] = (( 0.7328 * 1.910197) + (0.4296 * 0.370950));
M[1] = (( 0.7328 * -1.112124) + (0.4296 * 0.629054));
M[2] = (( 0.7328 * 0.201908) + (0.4296 * 0.000008) - 0.1624);
M[3] = ((-0.7036 * 1.910197) + (1.6975 * 0.370950));
M[4] = ((-0.7036 * -1.112124) + (1.6975 * 0.629054));
M[5] = ((-0.7036 * 0.201908) + (1.6975 * 0.000008) + 0.0061);
M[6] = (( 0.0030 * 1.910197) + (0.0136 * 0.370950));
M[7] = (( 0.0030 * -1.112124) + (0.0136 * 0.629054));
M[8] = (( 0.0030 * 0.201908) + (0.0136 * 0.000008) + 0.9834);;
return clr;
}
static
{
for (i = 0; i < 3; i++) {
}
return clr;
}
static
{
return clr;
}
{
return NULL;
}
case CUTSHEET_SURROUND:
lpMod->F = 0.8;
lpMod->c = 0.41;
break;
case DARK_SURROUND:
lpMod -> F = 0.8;
lpMod -> c = 0.525;
break;
case DIM_SURROUND:
lpMod -> F = 0.9;
lpMod -> c = 0.59;
break;
default:
// Average surround
lpMod -> F = 1.0;
lpMod -> c = 0.69;
}
if (lpMod -> D == D_CALCULATE) {
}
}
{
}
{
}
{
}