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

pi_app.h File Reference

#include "App.h"

Go to the source code of this file.

Classes

struct  PI_NAMEDCOLOR
struct  PI_GRAYCOLOR
struct  PI_RGBCOLOR
struct  PI_CMYKCOLOR
struct  PI_XYZCOLOR
struct  PI_YxyCOLOR
struct  PI_LabCOLOR
struct  PI_GENERIC3CHANNEL
struct  PI_HiFiCOLOR
union  CMColor
struct  CMConcatProfileSet
struct  CMUniqueIdentification
struct  CMBitmap
struct  tagCMNamedProfileInfo

Defines

#define CM_MAX_COLOR_CHANNELS   8
#define CallCMBitmapCallBackProc(f, a, b, c)   ((*f)((a)-(b),c))
#define kQualityMask   0x00030000 /* see Modes obove ( e.g. cmBestMode<<16 ) */
#define kLookupOnlyMask   0x00040000
#define kCreateGamutLutMask   0x00080000 /* Set Bit disables gamut lut creation */
#define kUseRelColorimetric   0x00100000
#define kStartWithXyzPCS   0x00200000
#define kStartWithLabPCS   0x00400000
#define kEndWithXyzPCS   0x00800000
#define kEndWithLabPCS   0x01000000

Typedefs

typedef unsigned long CMBitmapColorSpace
typedef long CMError
typedef unsigned int PI_OSType
typedef CMPrivateProfileRecord * CMProfileRef
typedef CMColor CMColor
typedef icHeader CMCoreProfileHeader
typedef CMConcatProfileSet CMConcatProfileSet
typedef icDateTimeNumber CMDateTime
typedef CMUniqueIdentification CMUniqueIdentification
typedef CMBitmap CMBitmap
typedef char CMColorName [32]
typedef CMColorNamepCMColorName
typedef const CMColorNamepcCMColorName
typedef tagCMNamedProfileInfo CMNamedProfileInfo
typedef CMNamedProfileInfopCMNamedProfileInfo
typedef unsigned char PI_Boolean
typedef PI_Boolean(* CMBitmapCallBackProcPtr )(long progress, void *refCon)
typedef CMBitmapCallBackProcPtr CMBitmapCallBackUPP
typedef CMPrivateColorWorldRecord * CMWorldRef

Enumerations

enum  cmErrorCodes {
  cmopenErr = -200, cmparamErr = 86, cmProfileError = 2301, cmMethodError = -203,
  cmCantConcatenateError = -208, cmInvalidColorSpace = -209, cmInvalidSrcMap = -210, cmInvalidDstMap = -211,
  cmNamedColorNotFound = -216, cmElementTagNotFound = 2302, userCanceledErr = -128, badProfileError = -228,
  memFullErr = 8
}
enum  {
  cmNoColorPacking = 0x0000, cmAlphaSpace = 0x0080, cmWord5ColorPacking = 0x0500, cmWord565ColorPacking = 0x0600,
  cmLong8ColorPacking = 0x0800, cmLong10ColorPacking = 0x0A00, cmAlphaFirstPacking = 0x1000, cmOneBitDirectPacking = 0x0B00,
  cmAlphaLastPacking = 0x0000, cm8PerChannelPacking = 0x2000, cm10PerChannelPacking = 0x0A00, cm16PerChannelPacking = 0x4000,
  cm32_32ColorPacking = 0x2700
}
enum  {
  cmNoSpace = 0, cmRGBSpace = 1, cmCMYKSpace = 2, cmHSVSpace = 3,
  cmHLSSpace = 4, cmYXYSpace = 5, cmXYZSpace = 6, cmLUVSpace = 7,
  cmLABSpace = 8, cmCMYSpace = 9, cmGraySpace = 10, cmReservedSpace2 = 11,
  cmGamutResultSpace = 12, cmGenericSpace = 13, cmBGRSpace = 14, cmYCCSpace = 15,
  cmNamedIndexedSpace = 16, cmMCFiveSpace = 17, cmMCSixSpace = 18, cmMCSevenSpace = 19,
  cmMCEightSpace = 20, cmKYMCSpace = 29, cmRGBASpace = cmRGBSpace + cmAlphaSpace, cmGrayASpace = cmGraySpace + cmAlphaSpace,
  cmRGB16Space = cmWord5ColorPacking + cmRGBSpace, cmRGB16_565Space = cmWord565ColorPacking + cmRGBSpace, cmRGB32Space = cmLong8ColorPacking + cmRGBSpace, cmARGB32Space = cmLong8ColorPacking + cmAlphaFirstPacking + cmRGBASpace,
  cmCMYK32Space = cmLong8ColorPacking + cmCMYKSpace, cmKYMC32Space = cmLong8ColorPacking + cmKYMCSpace, cmHSV32Space = cmLong10ColorPacking + cmHSVSpace, cmHLS32Space = cmLong10ColorPacking + cmHLSSpace,
  cmYXY32Space = cmLong10ColorPacking + cmYXYSpace, cmXYZ32Space = cmLong10ColorPacking + cmXYZSpace, cmLUV32Space = cmLong10ColorPacking + cmLUVSpace, cmLAB32Space = cmLong10ColorPacking + cmLABSpace,
  cmGamutResult1Space = cmOneBitDirectPacking + cmGamutResultSpace, cmRGB24Space = cm8PerChannelPacking + cmRGBSpace, cmRGBA32Space = cm8PerChannelPacking + cmAlphaLastPacking + cmRGBASpace, cmCMY24Space = cm8PerChannelPacking + cmCMYSpace,
  cmLAB24Space = cm8PerChannelPacking + cmLABSpace, cmGraySpace8Bit = cmGraySpace + cm8PerChannelPacking, cmYCC24Space = cm8PerChannelPacking + cmYCCSpace, cmYCC32Space = cmLong8ColorPacking + cmYCCSpace,
  cmYCCASpace = cmYCCSpace + cmAlphaSpace, cmYCCA32Space = cm8PerChannelPacking + cmAlphaLastPacking + cmYCCASpace, cmAYCC32Space = cmLong8ColorPacking + cmAlphaFirstPacking + cmYCCASpace, cmBGR24Space = cm8PerChannelPacking + cmBGRSpace,
  cmBGR32Space = cmLong8ColorPacking + cmBGRSpace + cmAlphaSpace, cmNamedIndexed24Space = cmNamedIndexedSpace, cmNamedIndexed32Space = cm32_32ColorPacking + cmNamedIndexedSpace, cmMCFive8Space = cmMCFiveSpace + cm8PerChannelPacking,
  cmMCSix8Space = cmMCSixSpace + cm8PerChannelPacking, cmMCSeven8Space = cmMCSevenSpace + cm8PerChannelPacking, cmMCEight8Space = cmMCEightSpace + cm8PerChannelPacking
}
enum  { cmPerceptual = 0, cmRelativeColorimetric = 1, cmSaturation = 2, cmAbsoluteColorimetric = 3 }
enum  { cmNormalMode = 0, cmDraftMode = 1, cmBestMode = 2, cmBestMode16Bit = 3 }

Functions

PI_Boolean CMProfileElementExists (CMProfileRef prof, PI_OSType tag)
CMError CMGetProfileElement (CMProfileRef prof, PI_OSType tag, unsigned long *elementSize, void *elementData)
CMError CMGetProfileHeader (CMProfileRef prof, CMCoreProfileHeader *header)
CMError CMGetPartialProfileElement (CMProfileRef prof, PI_OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData)
CMError CMSetProfileElementSize (CMProfileRef prof, PI_OSType tag, unsigned long elementSize)
CMError CMSetPartialProfileElement (CMProfileRef prof, PI_OSType tag, unsigned long offset, unsigned long byteCount, void *elementData)
CMError CMSetProfileElement (CMProfileRef prof, PI_OSType tag, unsigned long elementSize, void *elementData)
CMError CMSetProfileHeader (CMProfileRef prof, const CMCoreProfileHeader *header)
CMError CWNewColorWorld (CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
CMError CWConcatColorWorld (CMWorldRef *cw, CMConcatProfileSet *profileSet)
CMError CWConcatColorWorld4MS (CMWorldRef *storage, CMConcatProfileSet *profileSet, UINT32 *aIntentArr, UINT32 nIntents, UINT32 dwFlags)
CMError CWCreateLink4MS (CMWorldRef storage, CMConcatProfileSet *profileSet, UINT32 aIntentArr, icProfile **theLinkProfile)
CMError CWLinkColorWorld (CMWorldRef *cw, CMConcatProfileSet *profileSet)
void CWDisposeColorWorld (CMWorldRef cw)
CMError CWMatchColors (CMWorldRef cw, CMColor *myColors, unsigned long count)
CMError CWCheckColors (CMWorldRef cw, CMColor *myColors, unsigned long count, unsigned char *result)
CMError CWCheckColorsMS (CMWorldRef cw, CMColor *myColors, unsigned long count, unsigned char *result)
CMError CWGetColorSpaces (CMWorldRef cw, CMBitmapColorSpace *In, CMBitmapColorSpace *Out)
CMError CWMatchBitmap (CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
CMError CWCheckBitmap (CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
CMError CWMatchBitmapPlane (CMWorldRef cw, LH_CMBitmapPlane *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, LH_CMBitmapPlane *matchedBitmap)
CMError CWCheckBitmapPlane (CMWorldRef cw, LH_CMBitmapPlane *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, LH_CMBitmapPlane *matchedBitmap)
void CMFullColorRemains (CMWorldRef Storage, long ColorMask)
void CMSetLookupOnlyMode (CMWorldRef Storage, PI_Boolean Mode)
CMError CMValidateProfile (CMProfileRef prof, PI_Boolean *valid)
CMError CMConvNameToIndexProfile (CMProfileRef prof, pcCMColorName, unsigned long *, unsigned long)
CMError CMConvNameToIndexCW (CMWorldRef *Storage, pcCMColorName, unsigned long *, unsigned long)
CMError CMConvIndexToNameProfile (CMProfileRef prof, unsigned long *, pCMColorName, unsigned long)
CMError CMConvIndexToNameCW (CMWorldRef *Storage, unsigned long *, pCMColorName, unsigned long)
CMError CMGetNamedProfileInfoProfile (CMProfileRef prof, pCMNamedProfileInfo)
CMError CMGetNamedProfileInfoCW (CMWorldRef *Storage, pCMNamedProfileInfo)


Define Documentation

#define CallCMBitmapCallBackProc f,
a,
b,
c   )     ((*f)((a)-(b),c))
 

Definition at line 150 of file w98/lh_open/pi_app.h.

#define CM_MAX_COLOR_CHANNELS   8
 

Definition at line 21 of file w98/lh_open/pi_app.h.

#define kCreateGamutLutMask   0x00080000 /* Set Bit disables gamut lut creation */
 

Definition at line 331 of file w98/lh_open/pi_app.h.

#define kEndWithLabPCS   0x01000000
 

Definition at line 336 of file w98/lh_open/pi_app.h.

#define kEndWithXyzPCS   0x00800000
 

Definition at line 335 of file w98/lh_open/pi_app.h.

#define kLookupOnlyMask   0x00040000
 

Definition at line 330 of file w98/lh_open/pi_app.h.

#define kQualityMask   0x00030000 /* see Modes obove ( e.g. cmBestMode<<16 ) */
 

Definition at line 329 of file w98/lh_open/pi_app.h.

#define kStartWithLabPCS   0x00400000
 

Definition at line 334 of file w98/lh_open/pi_app.h.

#define kStartWithXyzPCS   0x00200000
 

Definition at line 333 of file w98/lh_open/pi_app.h.

#define kUseRelColorimetric   0x00100000
 

Definition at line 332 of file w98/lh_open/pi_app.h.


Typedef Documentation

typedef struct CMBitmap CMBitmap
 

Definition at line 297 of file w98/lh_open/pi_app.h.

typedef PI_Boolean(* CMBitmapCallBackProcPtr)(long progress, void *refCon)
 

Definition at line 343 of file w98/lh_open/pi_app.h.

typedef CMBitmapCallBackProcPtr CMBitmapCallBackUPP
 

Definition at line 345 of file w98/lh_open/pi_app.h.

typedef unsigned long CMBitmapColorSpace
 

Definition at line 22 of file w98/lh_open/pi_app.h.

typedef union CMColor CMColor
 

typedef char CMColorName[32]
 

Definition at line 299 of file w98/lh_open/pi_app.h.

typedef struct CMConcatProfileSet CMConcatProfileSet
 

Definition at line 174 of file w98/lh_open/pi_app.h.

typedef icHeader CMCoreProfileHeader
 

Definition at line 165 of file w98/lh_open/pi_app.h.

typedef icDateTimeNumber CMDateTime
 

Definition at line 176 of file w98/lh_open/pi_app.h.

typedef long CMError
 

Definition at line 23 of file w98/lh_open/pi_app.h.

typedef struct tagCMNamedProfileInfo CMNamedProfileInfo
 

typedef struct CMPrivateProfileRecord* CMProfileRef
 

Definition at line 25 of file w98/lh_open/pi_app.h.

typedef struct CMUniqueIdentification CMUniqueIdentification
 

Definition at line 183 of file w98/lh_open/pi_app.h.

typedef struct CMPrivateColorWorldRecord* CMWorldRef
 

Definition at line 348 of file w98/lh_open/pi_app.h.

typedef const CMColorName* pcCMColorName
 

Definition at line 301 of file w98/lh_open/pi_app.h.

typedef CMColorName* pCMColorName
 

Definition at line 300 of file w98/lh_open/pi_app.h.

typedef CMNamedProfileInfo* pCMNamedProfileInfo
 

Definition at line 309 of file w98/lh_open/pi_app.h.

typedef unsigned char PI_Boolean
 

Definition at line 338 of file w98/lh_open/pi_app.h.

typedef unsigned int PI_OSType
 

Definition at line 24 of file w98/lh_open/pi_app.h.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
cmNoColorPacking 
cmAlphaSpace 
cmWord5ColorPacking 
cmWord565ColorPacking 
cmLong8ColorPacking 
cmLong10ColorPacking 
cmAlphaFirstPacking 
cmOneBitDirectPacking 
cmAlphaLastPacking 
cm8PerChannelPacking 
cm10PerChannelPacking 
cm16PerChannelPacking 
cm32_32ColorPacking 

Definition at line 186 of file w98/lh_open/pi_app.h.

00186 { 00187 cmNoColorPacking = 0x0000, 00188 cmAlphaSpace = 0x0080, 00189 cmWord5ColorPacking = 0x0500, 00190 cmWord565ColorPacking = 0x0600, 00191 cmLong8ColorPacking = 0x0800, 00192 cmLong10ColorPacking = 0x0A00, 00193 cmAlphaFirstPacking = 0x1000, 00194 cmOneBitDirectPacking = 0x0B00, /* for gamut check. highest bit first */ 00195 cmAlphaLastPacking = 0x0000, 00196 cm8PerChannelPacking = 0x2000, 00197 cm10PerChannelPacking = 0x0A00, 00198 cm16PerChannelPacking = 0x4000, 00199 00200 cm32_32ColorPacking = 0x2700 00201 };

anonymous enum
 

Enumeration values:
cmNoSpace 
cmRGBSpace 
cmCMYKSpace 
cmHSVSpace 
cmHLSSpace 
cmYXYSpace 
cmXYZSpace 
cmLUVSpace 
cmLABSpace 
cmCMYSpace 
cmGraySpace 
cmReservedSpace2 
cmGamutResultSpace 
cmGenericSpace 
cmBGRSpace 
cmYCCSpace 
cmNamedIndexedSpace 
cmMCFiveSpace 
cmMCSixSpace 
cmMCSevenSpace 
cmMCEightSpace 
cmKYMCSpace 
cmRGBASpace 
cmGrayASpace 
cmRGB16Space 
cmRGB16_565Space 
cmRGB32Space 
cmARGB32Space 
cmCMYK32Space 
cmKYMC32Space 
cmHSV32Space 
cmHLS32Space 
cmYXY32Space 
cmXYZ32Space 
cmLUV32Space 
cmLAB32Space 
cmGamutResult1Space 
cmRGB24Space 
cmRGBA32Space 
cmCMY24Space 
cmLAB24Space 
cmGraySpace8Bit 
cmYCC24Space 
cmYCC32Space 
cmYCCASpace 
cmYCCA32Space 
cmAYCC32Space 
cmBGR24Space 
cmBGR32Space 
cmNamedIndexed24Space 
cmNamedIndexed32Space 
cmMCFive8Space 
cmMCSix8Space 
cmMCSeven8Space 
cmMCEight8Space 

Definition at line 204 of file w98/lh_open/pi_app.h.

00204 { 00205 cmNoSpace = 0, 00206 cmRGBSpace = 1, 00207 cmCMYKSpace = 2, 00208 cmHSVSpace = 3, 00209 cmHLSSpace = 4, 00210 cmYXYSpace = 5, 00211 cmXYZSpace = 6, 00212 cmLUVSpace = 7, 00213 cmLABSpace = 8, 00214 cmCMYSpace = 9, 00215 cmGraySpace = 10, 00216 cmReservedSpace2 = 11, 00217 cmGamutResultSpace = 12, 00218 00219 cmGenericSpace = 13, /*UWE: GenericDataFormat */ 00220 cmBGRSpace = 14, /*UWE: BGR */ 00221 cmYCCSpace = 15, /*UWE: YCC */ 00222 cmNamedIndexedSpace = 16, /* */ 00223 00224 cmMCFiveSpace = 17, 00225 cmMCSixSpace = 18, 00226 cmMCSevenSpace = 19, 00227 cmMCEightSpace = 20, 00228 00229 cmKYMCSpace = 29, 00230 cmRGBASpace = cmRGBSpace + cmAlphaSpace, 00231 cmGrayASpace = cmGraySpace + cmAlphaSpace, 00232 cmRGB16Space = cmWord5ColorPacking + cmRGBSpace, 00233 cmRGB16_565Space = cmWord565ColorPacking + cmRGBSpace, 00234 cmRGB32Space = cmLong8ColorPacking + cmRGBSpace, 00235 cmARGB32Space = cmLong8ColorPacking + cmAlphaFirstPacking + cmRGBASpace, 00236 cmCMYK32Space = cmLong8ColorPacking + cmCMYKSpace, 00237 cmKYMC32Space = cmLong8ColorPacking + cmKYMCSpace, 00238 cmHSV32Space = cmLong10ColorPacking + cmHSVSpace, 00239 cmHLS32Space = cmLong10ColorPacking + cmHLSSpace, 00240 cmYXY32Space = cmLong10ColorPacking + cmYXYSpace, 00241 cmXYZ32Space = cmLong10ColorPacking + cmXYZSpace, 00242 cmLUV32Space = cmLong10ColorPacking + cmLUVSpace, 00243 cmLAB32Space = cmLong10ColorPacking + cmLABSpace, 00244 cmGamutResult1Space = cmOneBitDirectPacking + cmGamutResultSpace, 00245 cmRGB24Space = cm8PerChannelPacking + cmRGBSpace, 00246 cmRGBA32Space = cm8PerChannelPacking + cmAlphaLastPacking + cmRGBASpace, 00247 cmCMY24Space = cm8PerChannelPacking + cmCMYSpace, 00248 cmLAB24Space = cm8PerChannelPacking + cmLABSpace, 00249 00250 cmGraySpace8Bit = cmGraySpace + cm8PerChannelPacking, 00251 cmYCC24Space = cm8PerChannelPacking + cmYCCSpace, 00252 cmYCC32Space = cmLong8ColorPacking + cmYCCSpace, 00253 cmYCCASpace = cmYCCSpace + cmAlphaSpace, 00254 cmYCCA32Space = cm8PerChannelPacking + cmAlphaLastPacking + cmYCCASpace, 00255 cmAYCC32Space = cmLong8ColorPacking + cmAlphaFirstPacking + cmYCCASpace, 00256 cmBGR24Space = cm8PerChannelPacking + cmBGRSpace, 00257 cmBGR32Space = cmLong8ColorPacking + cmBGRSpace + cmAlphaSpace, 00258 00259 cmNamedIndexed24Space = cmNamedIndexedSpace, 00260 cmNamedIndexed32Space = cm32_32ColorPacking + cmNamedIndexedSpace, 00261 00262 cmMCFive8Space = cmMCFiveSpace + cm8PerChannelPacking, 00263 cmMCSix8Space = cmMCSixSpace + cm8PerChannelPacking, 00264 cmMCSeven8Space = cmMCSevenSpace + cm8PerChannelPacking, 00265 cmMCEight8Space = cmMCEightSpace + cm8PerChannelPacking 00266 #if ( CM_MAX_COLOR_CHANNELS == 16 ) 00267 , 00268 cmMC9Space = cmMCEight8Space + 1, 00269 cmMCaSpace = cmMCEight8Space + 2, 00270 cmMCbSpace = cmMCEight8Space + 3, 00271 cmMCcSpace = cmMCEight8Space + 4, 00272 cmMCdSpace = cmMCEight8Space + 5, 00273 cmMCeSpace = cmMCEight8Space + 6, 00274 cmMCfSpace = cmMCEight8Space + 7, 00275 cmMC2Space = cmMCEight8Space + 8, 00276 cmMC98Space = cmMC9Space + cm8PerChannelPacking, 00277 cmMCa8Space = cmMCaSpace + cm8PerChannelPacking, 00278 cmMCb8Space = cmMCbSpace + cm8PerChannelPacking, 00279 cmMCc8Space = cmMCcSpace + cm8PerChannelPacking, 00280 cmMCd8Space = cmMCdSpace + cm8PerChannelPacking, 00281 cmMCe8Space = cmMCeSpace + cm8PerChannelPacking, 00282 cmMCf8Space = cmMCfSpace + cm8PerChannelPacking, 00283 cmMC28Space = cmMC2Space + cm8PerChannelPacking 00284 #endif 00285 };

anonymous enum
 

Enumeration values:
cmPerceptual 
cmRelativeColorimetric 
cmSaturation 
cmAbsoluteColorimetric 

Definition at line 313 of file w98/lh_open/pi_app.h.

00313 { 00314 cmPerceptual = 0, /* Photographic images */ 00315 cmRelativeColorimetric = 1, /* Logo Colors */ 00316 cmSaturation = 2, /* Business graphics */ 00317 cmAbsoluteColorimetric = 3 /* Logo Colors */ 00318 };

anonymous enum
 

Enumeration values:
cmNormalMode 
cmDraftMode 
cmBestMode 
cmBestMode16Bit 

Definition at line 321 of file w98/lh_open/pi_app.h.

00321 { 00322 cmNormalMode = 0, /* it uses the least significent two bits in the high word of flag */ 00323 cmDraftMode = 1, /* it should be evaulated like this: right shift 16 bits first, mask off the */ 00324 cmBestMode = 2, /* high 14 bits, and then compare with the enum to determine the option value. Do NOT shift if CWConcatColorWorld4MS is used */ 00325 cmBestMode16Bit = 3 /* calculate 16 bit combi LUT */ 00326 };

enum cmErrorCodes
 

Enumeration values:
cmopenErr 
cmparamErr 
cmProfileError 
cmMethodError 
cmCantConcatenateError 
cmInvalidColorSpace 
cmInvalidSrcMap 
cmInvalidDstMap 
cmNamedColorNotFound 
cmElementTagNotFound 
userCanceledErr 
badProfileError 
memFullErr 

Definition at line 124 of file w98/lh_open/pi_app.h.

00124 { 00125 /* General Errors */ 00126 cmopenErr = -200, /* I/O Error used in ProfileAccess.c only */ 00127 cmparamErr = 86, 00128 00129 cmProfileError = 2301, 00130 cmMethodError = -203, /* This is an internal error, no CalcFunction found */ 00131 cmCantConcatenateError = -208, /* No concatenation possible */ 00132 00133 cmInvalidColorSpace = -209, /* no match between Profile colorspace bitmap type */ 00134 cmInvalidSrcMap = -210, /* Source bitmap color space is invalid */ 00135 cmInvalidDstMap = -211, /* Destination bitmap color space is invalid */ 00136 00137 cmNamedColorNotFound = -216, /* index > count of named colors */ 00138 00139 cmElementTagNotFound = 2302, 00140 00141 userCanceledErr = -128, /* callback proc returned to cancel calculation */ 00142 badProfileError = -228, /* header->magic != icMagicNumber used in ProfileAccess.c only */ 00143 memFullErr = 8 00144 };


Function Documentation

CMError CMConvIndexToNameCW CMWorldRef Storage,
unsigned long *  ,
pCMColorName  ,
unsigned  long
 

CMError CMConvIndexToNameProfile CMProfileRef  prof,
unsigned long *  ,
pCMColorName  ,
unsigned  long
 

Referenced by CMConvertIndexToColorName().

CMError CMConvNameToIndexCW CMWorldRef Storage,
pcCMColorName  ,
unsigned long *  ,
unsigned  long
 

CMError CMConvNameToIndexProfile CMProfileRef  prof,
pcCMColorName  ,
unsigned long *  ,
unsigned  long
 

Referenced by CMConvertColorNameToIndex().

void CMFullColorRemains CMWorldRef  Storage,
long  ColorMask
 

Definition at line 393 of file lh_open/pi_color.c.

References CMMModelPtr, CMLutParam::colorLut, CMLutParam::colorLutGridPoints, CMLutParam::colorLutInDim, CMLutParam::colorLutOutDim, CMLutParam::colorLutWordSize, DATA_2_PTR, LOCK_DATA, Size, and UNLOCK_DATA.

00395 { 00396 CMMModelPtr aPtr; 00397 CMLutParamPtr lutParamPtr; 00398 long Address,Size,i,j; 00399 00400 if( Storage == 0 )return; 00401 LOCK_DATA( Storage ); 00402 aPtr = (CMMModelPtr)(DATA_2_PTR( Storage )); 00403 lutParamPtr = &aPtr->lutParam; 00404 00405 Size = lutParamPtr->colorLutWordSize / 8; 00406 if( !(lutParamPtr->colorLutInDim == 4 && lutParamPtr->colorLutOutDim == 4 ))return; 00407 00408 for( i=0; i<4; i++ ){ 00409 if( (ColorMask & (1<<i)) == 0 ) continue; 00410 Address = lutParamPtr->colorLutGridPoints - 1; 00411 for( j=3-i+1; j<4; j++ )Address *= lutParamPtr->colorLutGridPoints; 00412 Address = Address * lutParamPtr->colorLutOutDim; 00413 for( j=0; j<4; j++){ 00414 if( i == j ){ 00415 if( Size == 1 ){ 00416 *( ((unsigned char*)lutParamPtr->colorLut)+Address+3-j ) = (unsigned char)255; 00417 } 00418 else{ 00419 *( ((unsigned short*)lutParamPtr->colorLut)+Address+3-j ) = (unsigned short)65535; 00420 } 00421 } 00422 else{ 00423 if( Size == 1 ){ 00424 *( ((unsigned char*)lutParamPtr->colorLut)+Address+3-j ) = (unsigned char)0; 00425 } 00426 else{ 00427 *( ((unsigned short*)lutParamPtr->colorLut)+Address+3-j ) = (unsigned short)0; 00428 } 00429 } 00430 } 00431 } 00432 UNLOCK_DATA( Storage ); 00433 return; 00434 }

CMError CMGetNamedProfileInfoCW CMWorldRef Storage,
pCMNamedProfileInfo 
 

CMError CMGetNamedProfileInfoProfile CMProfileRef  prof,
pCMNamedProfileInfo 
 

Referenced by CMGetNamedProfileInfo().

CMError CMGetPartialProfileElement CMProfileRef  prof,
PI_OSType  tag,
unsigned long  offset,
unsigned long *  byteCount,
void *  elementData
 

CMError CMGetProfileElement CMProfileRef  prof,
PI_OSType  tag,
unsigned long *  elementSize,
void *  elementData
 

CMError CMGetProfileHeader CMProfileRef  prof,
CMCoreProfileHeader header
 

Definition at line 30 of file ntgdi/icm/mscmm/mscmm/access.c.

References badProfileError, BOOL, CMCoreProfileHeader, CMError, CMProfileRef, GetColorProfileHeader(), icMagicNumber, and noErr.

Referenced by CMMConcatInitPrivate(), CMMInitPrivate(), CMValidateProfile(), Create_LH_ProfileSet(), CreateCombi(), MakeSessionFromLink(), MyAdd_NL_SequenceDescTag(), MyGetColorSpaces(), and PrepareCombiLUTs().

00032 { 00033 BOOL bool; 00034 CMError ret = badProfileError; 00035 00036 bool = GetColorProfileHeader( (HPROFILE)prof, (PPROFILEHEADER) header ); 00037 if (header->magic == icMagicNumber && bool ) 00038 ret = noErr; 00039 00040 return (ret); 00041 }

PI_Boolean CMProfileElementExists CMProfileRef  prof,
PI_OSType  tag
 

void CMSetLookupOnlyMode CMWorldRef  Storage,
PI_Boolean  Mode
 

Definition at line 380 of file lh_open/pi_color.c.

References CMMModelPtr, DATA_2_PTR, LOCK_DATA, and UNLOCK_DATA.

00382 { 00383 CMMModelPtr aPtr; 00384 00385 if( Storage == 0 )return; 00386 LOCK_DATA( Storage ); 00387 aPtr = (CMMModelPtr)(DATA_2_PTR( Storage )); 00388 aPtr->lookup = Mode; 00389 UNLOCK_DATA( Storage ); 00390 return; 00391 }

CMError CMSetPartialProfileElement CMProfileRef  prof,
PI_OSType  tag,
unsigned long  offset,
unsigned long  byteCount,
void *  elementData
 

CMError CMSetProfileElement CMProfileRef  prof,
PI_OSType  tag,
unsigned long  elementSize,
void *  elementData
 

CMError CMSetProfileElementSize CMProfileRef  prof,
PI_OSType  tag,
unsigned long  elementSize
 

CMError CMSetProfileHeader CMProfileRef  prof,
const CMCoreProfileHeader header
 

CMError CMValidateProfile CMProfileRef  prof,
PI_Boolean valid
 

Definition at line 302 of file lh_open/pi_valid.c.

References CMError, CMGetProfileHeader(), cmProfileError, CMProfileRef, CMValAbstract(), CMValColorSpace(), CMValDisplay(), CMValInput(), CMValLink(), CMValNamed(), CMValOutput(), icHeader::deviceClass, FALSE, icSigAbstractClass, icSigColorSpaceClass, icSigDisplayClass, icSigInputClass, icSigLinkClass, icSigNamedColorClass, icSigOutputClass, icVersionNumber, noErr, and icHeader::version.

00304 { 00305 CMError err = noErr; 00306 icHeader aHeader; 00307 00308 *valid = FALSE; 00309 err = CMGetProfileHeader((CMProfileRef)prof, &aHeader); 00310 00311 if (!err) 00312 { 00313 if ((aHeader.version & 0xff000000) >= icVersionNumber ){ 00314 switch (aHeader.deviceClass) 00315 { 00316 case icSigInputClass: 00317 *valid = CMValInput(prof, &aHeader ); 00318 break; 00319 00320 case icSigDisplayClass: 00321 *valid = CMValDisplay(prof, &aHeader ); 00322 break; 00323 00324 case icSigOutputClass: 00325 *valid = CMValOutput(prof, &aHeader ); 00326 break; 00327 00328 case icSigLinkClass: 00329 *valid = CMValLink(prof); 00330 break; 00331 00332 case icSigColorSpaceClass: 00333 *valid = CMValColorSpace(prof, &aHeader ); 00334 break; 00335 00336 case icSigAbstractClass: 00337 *valid = CMValAbstract(prof, &aHeader ); 00338 break; 00339 00340 case icSigNamedColorClass: 00341 *valid = CMValNamed(prof, &aHeader ); 00342 break; 00343 00344 default: 00345 *valid = FALSE; 00346 } 00347 00348 } 00349 else 00350 { /* unknown profile */ 00351 *valid = FALSE; 00352 return (cmProfileError); 00353 } 00354 } 00355 00356 return (err); 00357 }

CMError CWCheckBitmap CMWorldRef  cw,
const CMBitmap bitmap,
CMBitmapCallBackUPP  progressProc,
void *  refCon,
CMBitmap resultBitmap
 

Definition at line 113 of file lh_open/pi_run.c.

References CMError, CMMModelPtr, cmparamErr, DATA_2_PTR, LHCheckBitMapPrivate(), LOCK_DATA, noErr, and UNLOCK_DATA.

Referenced by CMCheckColorsInGamut(), and CMCheckRGBs().

00119 { 00120 CMError err = noErr; 00121 CMMModelPtr aPtr; 00122 00123 if( Storage == 0 )return cmparamErr; 00124 LOCK_DATA( Storage ); 00125 aPtr = (CMMModelPtr)(DATA_2_PTR( Storage )); 00126 err = LHCheckBitMapPrivate( aPtr, 00127 (const CMBitmap*)bitMap, 00128 progressProc, 00129 refCon, 00130 resultBitMap ); 00131 UNLOCK_DATA( Storage ); 00132 return err; 00133 }

CMError CWCheckBitmapPlane CMWorldRef  cw,
LH_CMBitmapPlane bitmap,
CMBitmapCallBackUPP  progressProc,
void *  refCon,
LH_CMBitmapPlane matchedBitmap
 

Definition at line 224 of file lh_open/pi_run.c.

References CMError, and cmparamErr.

00230 { 00231 Storage=Storage; 00232 bitMap=bitMap; 00233 progressProc=progressProc; 00234 refCon=refCon; 00235 CheckedBitMap=CheckedBitMap; 00236 return cmparamErr; 00237 /*CMError err = noErr; 00238 CMMModelPtr aPtr; 00239 00240 if( Storage == 0 )return cmparamErr; 00241 LOCK_DATA( Storage ); 00242 aPtr = (CMMModelPtr)(DATA_2_PTR( Storage )); 00243 err = LHMatchBitMapPlanePrivate( aPtr, 00244 (const LH_CMBitmapPlane*)bitMap, 00245 progressProc, 00246 refCon, 00247 CheckedBitMap ); 00248 UNLOCK_DATA( Storage ); 00249 return err;*/ 00250 }

CMError CWCheckColors CMWorldRef  cw,
CMColor myColors,
unsigned long  count,
unsigned char *  result
 

Definition at line 359 of file lh_open/pi_run.c.

References CMError, CMMModelPtr, cmparamErr, DATA_2_PTR, LHCheckColorsPrivate(), LOCK_DATA, noErr, and UNLOCK_DATA.

00364 { 00365 CMError err = noErr; 00366 CMMModelPtr aPtr; 00367 00368 if( Storage == 0 )return cmparamErr; 00369 LOCK_DATA( Storage ); 00370 aPtr = (CMMModelPtr)(DATA_2_PTR( Storage )); 00371 err = LHCheckColorsPrivate( aPtr, myColors, count, result ); 00372 UNLOCK_DATA( Storage ); 00373 return err; 00374 }

CMError CWCheckColorsMS CMWorldRef  cw,
CMColor myColors,
unsigned long  count,
unsigned char *  result
 

CMError CWConcatColorWorld CMWorldRef cw,
CMConcatProfileSet profileSet
 

Definition at line 209 of file lh_open/pi_color.c.

References CMError, CMMConcatInitPrivate(), CMMModelPtr, CMWorldRef, LHColorWorldClose(), LHColorWorldOpen(), and Ptr.

00211 { 00212 Ptr myStorage; 00213 CMError err; 00214 00215 err = LHColorWorldOpen(&myStorage); 00216 00217 if ( !err ) 00218 { 00219 ((CMMModelPtr)myStorage)->aIntentArr = 0; 00220 ((CMMModelPtr)myStorage)->dwFlags = 0xffffffff; 00221 err = CMMConcatInitPrivate ((CMMModelPtr)myStorage, profileSet ); 00222 } 00223 00224 00225 if ( !err ) 00226 { 00227 *storage = (CMWorldRef)myStorage; 00228 } 00229 else{ 00230 *storage = (CMWorldRef)0; 00231 LHColorWorldClose( myStorage ); 00232 } 00233 00234 return err; 00235 }

CMError CWConcatColorWorld4MS CMWorldRef storage,
CMConcatProfileSet profileSet,
UINT32 aIntentArr,
UINT32  nIntents,
UINT32  dwFlags
 

Definition at line 283 of file lh_open/pi_color.c.

References CMError, CMMConcatInitPrivate(), CMMModelPtr, CMWorldRef, DeviceLinkFill(), dwFlags, LHColorWorldClose(), LHColorWorldOpen(), Ptr, and WriteProf().

Referenced by CMCreateMultiProfileTransformInternal().

00289 { 00290 Ptr myStorage; 00291 CMError err; 00292 #if WRITE_PROFILE 00293 icProfile *theLinkProfile; 00294 long l; 00295 #endif 00296 00297 err = LHColorWorldOpen(&myStorage); 00298 00299 if ( !err ) 00300 { 00301 ((CMMModelPtr)myStorage)->aIntentArr = aIntentArr; 00302 ((CMMModelPtr)myStorage)->nIntents = nIntents; 00303 ((CMMModelPtr)myStorage)->dwFlags = dwFlags; 00304 err = CMMConcatInitPrivate ((CMMModelPtr)myStorage, profileSet ); 00305 } 00306 00307 00308 if ( !err ) 00309 { 00310 *storage = (CMWorldRef)myStorage; 00311 } 00312 else{ 00313 *storage = (CMWorldRef)0; 00314 LHColorWorldClose( myStorage ); 00315 } 00316 00317 #if WRITE_PROFILE 00318 err = DeviceLinkFill( (CMMModelPtr)myStorage, profileSet, &theLinkProfile, 0 ); 00319 if( !err ){ 00320 l = *(unsigned long *)theLinkProfile; 00321 SwapLong(&l); 00322 WriteProf( "test", theLinkProfile, l ); 00323 } 00324 #endif 00325 return err; 00326 }

CMError CWCreateLink4MS CMWorldRef  storage,
CMConcatProfileSet profileSet,
UINT32  aIntentArr,
icProfile **  theLinkProfile
 

Definition at line 436 of file lh_open/pi_color.c.

References CMError, CMMModelPtr, and DeviceLinkFill().

00440 { 00441 CMError err; 00442 00443 *theLinkProfile = 0; 00444 00445 err = DeviceLinkFill( (CMMModelPtr)storage, profileSet, theLinkProfile, aIntent ); 00446 00447 return err; 00448 }

void CWDisposeColorWorld CMWorldRef  cw  ) 
 

Definition at line 375 of file lh_open/pi_color.c.

References LHColorWorldClose(), and Ptr.

Referenced by CMCreateDeviceLinkProfile(), CMCreateTransformExtInternal(), and CMDeleteTransform().

00376 { 00377 LHColorWorldClose ( (Ptr)storage ); 00378 }

CMError CWGetColorSpaces CMWorldRef  cw,
CMBitmapColorSpace In,
CMBitmapColorSpace Out
 

Definition at line 395 of file lh_open/pi_run.c.

References CMError, CMMModelPtr, cmparamErr, DATA_2_PTR, LOCK_DATA, noErr, and UNLOCK_DATA.

Referenced by CMTranslateRGB().

00399 { 00400 CMError err = noErr; 00401 CMMModelPtr aPtr; 00402 00403 if( cw == 0 )return cmparamErr; 00404 LOCK_DATA( cw ); 00405 aPtr = (CMMModelPtr)(DATA_2_PTR( cw )); 00406 *In = aPtr->firstColorSpace; 00407 *Out = aPtr->lastColorSpace; 00408 UNLOCK_DATA( cw ); 00409 return err; 00410 }

CMError CWLinkColorWorld CMWorldRef cw,
CMConcatProfileSet profileSet
 

Definition at line 329 of file lh_open/pi_color.c.

References CMError, CMMConcatInitPrivate(), CMMModelPtr, CMWorldRef, kCMMNewLinkProfile, LHColorWorldClose(), LHColorWorldOpen(), and Ptr.

00331 { 00332 Ptr myStorage; 00333 CMError err; 00334 00335 err = LHColorWorldOpen(&myStorage); 00336 00337 if ( !err ) 00338 { 00339 ((CMMModelPtr)myStorage)->currentCall = kCMMNewLinkProfile; 00340 ((CMMModelPtr)myStorage)->aIntentArr = 0; 00341 ((CMMModelPtr)myStorage)->dwFlags = 0xffffffff; 00342 err = CMMConcatInitPrivate ((CMMModelPtr)myStorage, profileSet ); 00343 } 00344 00345 00346 if ( !err ) 00347 { 00348 *storage = (CMWorldRef)myStorage; 00349 } 00350 else{ 00351 *storage = (CMWorldRef)0; 00352 LHColorWorldClose( myStorage ); 00353 } 00354 00355 return err; 00356 }

CMError CWMatchBitmap CMWorldRef  cw,
CMBitmap bitmap,
CMBitmapCallBackUPP  progressProc,
void *  refCon,
CMBitmap matchedBitmap
 

Definition at line 56 of file lh_open/pi_run.c.

References CMError, CMMModelPtr, cmparamErr, DATA_2_PTR, LHMatchBitMapPrivate(), LOCK_DATA, noErr, and UNLOCK_DATA.

Referenced by CMTranslateRGB(), CMTranslateRGBs(), and CMTranslateRGBsExt().

00063 { 00064 CMError err = noErr; 00065 CMMModelPtr aPtr; 00066 00067 if( Storage == 0 )return cmparamErr; 00068 LOCK_DATA( Storage ); 00069 aPtr = (CMMModelPtr)(DATA_2_PTR( Storage )); 00070 err = LHMatchBitMapPrivate( aPtr, 00071 (const CMBitmap*)bitMap, 00072 progressProc, 00073 refCon, 00074 matchedBitMap ); 00075 UNLOCK_DATA( Storage ); 00076 return err; 00077 }

CMError CWMatchBitmapPlane CMWorldRef  cw,
LH_CMBitmapPlane bitmap,
CMBitmapCallBackUPP  progressProc,
void *  refCon,
LH_CMBitmapPlane matchedBitmap
 

Definition at line 168 of file lh_open/pi_run.c.

References CMError, CMMModelPtr, cmparamErr, DATA_2_PTR, LHMatchBitMapPlanePrivate(), LOCK_DATA, noErr, and UNLOCK_DATA.

00174 { 00175 CMError err = noErr; 00176 CMMModelPtr aPtr; 00177 00178 if( Storage == 0 )return cmparamErr; 00179 LOCK_DATA( Storage ); 00180 aPtr = (CMMModelPtr)(DATA_2_PTR( Storage )); 00181 err = LHMatchBitMapPlanePrivate( aPtr, 00182 (const LH_CMBitmapPlane*)bitMap, 00183 progressProc, 00184 refCon, 00185 matchedBitMap ); 00186 UNLOCK_DATA( Storage ); 00187 return err; 00188 }

CMError CWMatchColors CMWorldRef  cw,
CMColor myColors,
unsigned long  count
 

Definition at line 273 of file lh_open/pi_run.c.

References CMError, CMMModelPtr, cmparamErr, DATA_2_PTR, LHMatchColorsPrivate(), LOCK_DATA, noErr, and UNLOCK_DATA.

Referenced by CMTranslateColors().

00277 { 00278 CMError err = noErr; 00279 CMMModelPtr aPtr; 00280 00281 if( Storage == 0 )return cmparamErr; 00282 LOCK_DATA( Storage ); 00283 aPtr = (CMMModelPtr)(DATA_2_PTR( Storage )); 00284 err = LHMatchColorsPrivate( aPtr, myColors, count ); 00285 UNLOCK_DATA( Storage ); 00286 return err; 00287 }

CMError CWNewColorWorld CMWorldRef cw,
CMProfileRef  src,
CMProfileRef  dst
 

Definition at line 141 of file lh_open/pi_color.c.

References CMError, CMMInitPrivate(), CMMModelPtr, CMWorldRef, LHColorWorldClose(), LHColorWorldOpen(), and Ptr.

00144 { 00145 Ptr myStorage; 00146 CMError err; 00147 00148 #ifdef DEBUG_OUTPUT 00149 /*printf("vor LHColorWorldOpen\n");*/ 00150 #endif 00151 err = LHColorWorldOpen(&myStorage); 00152 #ifdef DEBUG_OUTPUT 00153 /*printf("nach LHColorWorldOpen: err = %d\n", err);*/ 00154 #endif 00155 if ( !err ) 00156 { 00157 ((CMMModelPtr)myStorage)->aIntentArr = 0; 00158 ((CMMModelPtr)myStorage)->dwFlags = 0xffffffff; 00159 err = CMMInitPrivate((CMMModelPtr)myStorage, 00160 srcProfile, 00161 dstProfile); 00162 #ifdef DEBUG_OUTPUT 00163 /*printf("nach NCMMInitPrivate: err = %d\n", err);*/ 00164 #endif 00165 } 00166 00167 00168 if ( !err ) 00169 { 00170 *storage = (CMWorldRef)myStorage; 00171 } 00172 else{ 00173 *storage = (CMWorldRef)0; 00174 LHColorWorldClose( myStorage ); 00175 } 00176 00177 return err; 00178 }


Generated on Sat May 15 19:45:03 2004 for test by doxygen 1.3.7