SampleICC Main srcforge
Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IccUtil.cpp File Reference

#include "IccIO.h"
#include "IccUtil.h"
#include "IccTagFactory.h"
#include <stdlib.h>
#include <memory.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
#include <time.h>


#define PI   3.1415926535897932384626433832795


icValidateStatus icMaxStatus (icValidateStatus s1, icValidateStatus s2)
bool icIsSpaceCLR (icColorSpaceSignature sig)
void icColorIndexName (icChar *szName, icColorSpaceSignature csSig, int nIndex, int nColors, const icChar *szUnknown)
void icColorValue (icChar *szValue, icFloatNumber nValue, icColorSpaceSignature csSig, int nIndex)
bool icMatrixInvert3x3 (icFloatNumber *M)
void icMatrixMultiply3x3 (icFloatNumber *result, const icFloatNumber *l, const icFloatNumber *r)
void icVectorApplyMatrix3x3 (icFloatNumber *result, const icFloatNumber *m, const icFloatNumber *v)
icS15Fixed16Number icDtoF (icFloatNumber num)
icFloatNumber icFtoD (icS15Fixed16Number num)
icU16Fixed16Number icDtoUF (icFloatNumber num)
icFloatNumber icUFtoD (icU16Fixed16Number num)
icU1Fixed15Number icDtoUSF (icFloatNumber num)
icFloatNumber icUSFtoD (icU1Fixed15Number num)
icU8Fixed8Number icDtoUCF (icFloatNumber num)
icFloatNumber icUCFtoD (icU8Fixed8Number num)
icUInt8Number icFtoU8 (icFloatNumber num)
icFloatNumber icU8toF (icUInt8Number num)
icUInt16Number icFtoU16 (icFloatNumber num)
icFloatNumber icU16toF (icUInt16Number num)
void icNormXyz (icFloatNumber *XYZ, icFloatNumber *WhiteXYZ)
void icDeNormXyz (icFloatNumber *XYZ, icFloatNumber *WhiteXYZ)
void icLabtoXYZ (icFloatNumber *XYZ, icFloatNumber *Lab, icFloatNumber *WhiteXYZ)
void icXYZtoLab (icFloatNumber *Lab, icFloatNumber *XYZ, icFloatNumber *WhiteXYZ)
void icLch2Lab (icFloatNumber *Lab, icFloatNumber *Lch)
void icLab2Lch (icFloatNumber *Lch, icFloatNumber *Lab)
icFloatNumber icMin (icFloatNumber v1, icFloatNumber v2)
icFloatNumber icMax (icFloatNumber v1, icFloatNumber v2)
icUInt32Number icIntMin (icUInt32Number v1, icUInt32Number v2)
icUInt32Number icIntMax (icUInt32Number v1, icUInt32Number v2)
void icLabFromPcs (icFloatNumber *Lab)
 Here are some conversion routines to convert to regular Lab encoding.
void icLabToPcs (icFloatNumber *Lab)
void icXyzFromPcs (icFloatNumber *XYZ)
 Here are some conversion routines to convert to regular XYZ encoding.
void icXyzToPcs (icFloatNumber *XYZ)
void icMemDump (std::string &sDump, void *pBuf, icUInt32Number nNum)
void icMatrixDump (std::string &sDump, icS15Fixed16Number *pMatrix)
const icCharicGetSig (icChar *pBuf, icUInt32Number nSig, bool bGetHexVal)
const icCharicGetSigStr (icChar *pBuf, icUInt32Number nSig)
icUInt32Number icGetSigVal (const icChar *pBuf)
icUInt32Number icGetSpaceSamples (icColorSpaceSignature sig)


const char * icValidateWarningMsg = "Warning! - "
const char * icValidateNonCompliantMsg = "NonCompliant! - "
const char * icValidateCriticalErrorMsg = "Error! - "
icFloatNumber icD50XYZ [3] = { 0.9642f, 1.0000f, 0.8249f }
icFloatNumber icD50XYZxx [3] = { 96.42f, 100.00f, 82.49f }

Define Documentation


#define PI   3.1415926535897932384626433832795

Function Documentation

void icColorIndexName icChar szName,
icColorSpaceSignature  csSig,
int  nIndex,
int  nColors,
const icChar szUnknown

void icColorValue icChar szValue,
icFloatNumber  nValue,
icColorSpaceSignature  csSig,
int  nIndex

void icDeNormXyz icFloatNumber XYZ,
icFloatNumber WhiteXYZ

icS15Fixed16Number icDtoF icFloatNumber  num  ) 

icU8Fixed8Number icDtoUCF icFloatNumber  num  ) 

icU16Fixed16Number icDtoUF icFloatNumber  num  ) 

icU1Fixed15Number icDtoUSF icFloatNumber  num  ) 

icFloatNumber icFtoD icS15Fixed16Number  num  ) 

icUInt16Number icFtoU16 icFloatNumber  num  ) 

icUInt8Number icFtoU8 icFloatNumber  num  ) 

const icChar* icGetSig icChar pBuf,
icUInt32Number  nSig,
bool  bGetHexVal

const icChar* icGetSigStr icChar pBuf,
icUInt32Number  nSig

icUInt32Number icGetSigVal const icChar pBuf  ) 

icUInt32Number icGetSpaceSamples icColorSpaceSignature  sig  ) 

icUInt32Number icIntMax icUInt32Number  v1,
icUInt32Number  v2

icUInt32Number icIntMin icUInt32Number  v1,
icUInt32Number  v2

bool icIsSpaceCLR icColorSpaceSignature  sig  ) 

void icLab2Lch icFloatNumber Lch,
icFloatNumber Lab

void icLabFromPcs icFloatNumber Lab  ) 

Here are some conversion routines to convert to regular Lab encoding.

Floating point encoding of Lab in PCS is in range 0.0 to 1.0

void icLabToPcs icFloatNumber Lab  ) 

void icLabtoXYZ icFloatNumber XYZ,
icFloatNumber Lab,
icFloatNumber WhiteXYZ

void icLch2Lab icFloatNumber Lab,
icFloatNumber Lch

void icMatrixDump std::string &  sDump,
icS15Fixed16Number pMatrix

bool icMatrixInvert3x3 icFloatNumber M  ) 

Name: icMatrixInvert3x3

Purpose: Inversion of a 3x3 matrix using the Adjoint Cofactor and the determinant of the 3x3 matrix.

Note: Matrix index positions: 0 1 2 3 4 5 6 7 8

Args: M = matrix to invert.

Return: true = matrix is invertible and stored back into M, false = matrix is not invertible.

void icMatrixMultiply3x3 icFloatNumber result,
const icFloatNumber l,
const icFloatNumber r

Name: icMatrixMultiply3x3

Purpose: Multiply two 3x3 matricies resulting in a 3x3 matrix.

Note: Matrix index positions: 0 1 2 3 4 5 6 7 8

Args: result = matrix to recieve result. l = left matrix to multiply (matrix multiplication is order dependent) r = right matrix to multiply (matrix multiplicaiton is order dependent)

icFloatNumber icMax icFloatNumber  v1,
icFloatNumber  v2

icValidateStatus icMaxStatus icValidateStatus  s1,
icValidateStatus  s2

Name: icMaxStatus

Purpose: return worst status

Args: s1, s2


void icMemDump std::string &  sDump,
void *  pBuf,
icUInt32Number  nNum

icFloatNumber icMin icFloatNumber  v1,
icFloatNumber  v2

void icNormXyz icFloatNumber XYZ,
icFloatNumber WhiteXYZ

icFloatNumber icU16toF icUInt16Number  num  ) 

icFloatNumber icU8toF icUInt8Number  num  ) 

icFloatNumber icUCFtoD icU8Fixed8Number  num  ) 

icFloatNumber icUFtoD icU16Fixed16Number  num  ) 

icFloatNumber icUSFtoD icU1Fixed15Number  num  ) 

void icVectorApplyMatrix3x3 icFloatNumber result,
const icFloatNumber m,
const icFloatNumber v

Name: icVectorApplyMatrix3x3

Purpose: Applies a 3x3 matrix to a 3 element column vector.

Note: Matrix index positions: 0 1 2 3 4 5 6 7 8

Note: result = m x v

Args: result = vector to receive result. m = matrix to multiply v = vector to apply matrix to

void icXyzFromPcs icFloatNumber XYZ  ) 

Here are some conversion routines to convert to regular XYZ encoding.

Floating point encoding of XYZ in PCS is in range 0.0 to 1.0 (Note: X=1.0 is encoded as about 0.5)

void icXYZtoLab icFloatNumber Lab,
icFloatNumber XYZ,
icFloatNumber WhiteXYZ

void icXyzToPcs icFloatNumber XYZ  ) 

Variable Documentation

icFloatNumber icD50XYZ[3] = { 0.9642f, 1.0000f, 0.8249f }

icFloatNumber icD50XYZxx[3] = { 96.42f, 100.00f, 82.49f }

const char* icValidateCriticalErrorMsg = "Error! - "

const char* icValidateNonCompliantMsg = "NonCompliant! - "

const char* icValidateWarningMsg = "Warning! - "

Generated on Tue Jun 26 17:51:44 2007 for IccProfLib by  doxygen