65#include <ApplicationServices/ApplicationServices.h>
114#define DoubToUInt16(x) (((x)<=0.0)?(0):(((x)>=1.0)?(65535):((x)*65535.0 + 0.5)))
115#define UInt16ToDoub(x) ((double)(x)/65535.0)
116#define DoubToFract(x) (((x)<=0.0)?(0):(((x)>=2.0)?(65535):((x)*32768.0 + 0.5)))
117#define FractToDoub(x) ((double)(x)/32768.0)
118#define UInt16ToFract(x) ((x)>>1)
119#define FractToUInt16(x) ((x)<<1)
124DebugColor4( UInt16* color)
126 char s[] =
" 0xXXXX, 0xXXXX, 0xXXXX, 0xXXXX\n";
133 v = (((*color)>>12) & 0x000F); *c++ = (v<10) ? (v+
'0') : (v+
'A'-10);
134 v = (((*color)>>8) & 0x000F); *c++ = (v<10) ? (v+
'0') : (v+
'A'-10);
135 v = (((*color)>>4) & 0x000F); *c++ = (v<10) ? (v+
'0') : (v+
'A'-10);
136 v = (((*color)) & 0x000F); *c++ = (v<10) ? (v+
'0') : (v+
'A'-10);
159 sBuf = pMatchInfo->
srcBuf;
160 dBuf = pMatchInfo->
dstBuf;
161 int numIn = storage->
cmm->GetSourceSamples();
162 int numOut = storage->
cmm->GetDestSamples();
164 for (r=0; r < pMatchInfo->
height; r++)
166 for (c=0; c < pMatchInfo->
width; c++)
174 for (
int i=0; i<numIn; i++)
178 chanIn[i] = (float)Endian16_Swap(temp)*0.000015259;
184 for (
int i=0; i<numIn; i++)
186 if (sBuf[i]) chanIn[i] = (*(UInt8*)(sBuf[0] + (r * pMatchInfo->
srcRowBytes) + (c * pMatchInfo->
srcColBytes)))*0.00392157;
193 for (
int i=0; i<numIn; i++)
194 if (sBuf[i]) chanIn[i] = (*(UInt16*)(sBuf[i] + (r * pMatchInfo->
srcRowBytes) + (c * pMatchInfo->
srcColBytes)))*0.000015259;;
198 for (
int i=0; i<numIn; i++)
200 if (sBuf[i]) chanIn[i] = (*(UInt8*)(sBuf[0] + (r * pMatchInfo->
srcRowBytes) + (c * pMatchInfo->
srcColBytes)))*0.00392157;;
206 storage->
cmm->Apply(chanOut, chanIn);
214 for (
int i=0; i<numOut; i++)
216 UInt16 temp = (UInt16)(chanOut[i]*65535.0+0.5);
217 temp = Endian16_Swap(temp);
223 for (
int i=0; i<numOut; i++)
225 if (dBuf[i]) *(UInt16*)(dBuf[i] + (r * pMatchInfo->
dstRowBytes) + (c * pMatchInfo->
dstColBytes)) = (UInt8)(chanOut[i]*255.0+0.5);
232 for (
int i=0; i<numOut; i++)
234 if (dBuf[i]) *(UInt16*)(dBuf[i] + (r * pMatchInfo->
dstRowBytes) + (c * pMatchInfo->
dstColBytes)) = (UInt16)(chanOut[i]*65535.0+0.5);
239 for (
int i=0; i<numOut; i++)
241 if (dBuf[i]) *(UInt16*)(dBuf[i] + (r * pMatchInfo->
dstRowBytes) + (c * pMatchInfo->
dstColBytes)) = (UInt8)(chanOut[i]*255.0+0.5);
262 CMConvertXYZToLab( (CMColor*)chan, &white, (CMColor*)chan,1);
279 fx = 7.787 * X + 16.0 / 116.0;
284 fy = 7.787 * Y + 16.0 / 116.0;
289 fz = 7.787 * Z + 16.0 / 116.0;
292 a = 500.0 * (fx - fy);
293 b = 200.0 * (fy - fz);
296 a = (a + 128.0) / 256.0;
297 b = (b + 128.0) / 256.0;
313 CMConvertLabToXYZ( (CMColor*)chan, &white, (CMColor*)chan,1);
323 fy = (L + 16.0) / 116.0;
330 X = (fx - 16.0 / 116.0) / 7.787;
335 Y = (fy - 16.0 / 116.0) / 7.787;
340 Z = (fz - 16.0 / 116.0) / 7.787;
354 chan[0] = 0xFFFF - chan[0];
355 chan[1] = 0xFFFF - chan[1];
356 chan[2] = 0xFFFF - chan[2];
357 chan[3] = (chan[0] < chan[1]) ?
358 ( (chan[0] < chan[2]) ? (chan[0]) : (chan[2]) ) :
359 ( (chan[1] < chan[2]) ? (chan[1]) : (chan[2]) );
368 chan[0] = 0xFFFF - chan[0];
369 chan[1] = 0xFFFF - chan[1];
370 chan[2] = 0xFFFF - chan[2];
371 chan[0] = (chan[0] > chan[3]) ? (chan[0] - chan[3]) : 0;
372 chan[1] = (chan[1] > chan[3]) ? (chan[1] - chan[3]) : 0;
373 chan[2] = (chan[2] > chan[3]) ? (chan[2] - chan[3]) : 0;
393 X = (0.418 * r) + (0.363 * g) + (0.183 * b);
394 Y = (0.213 * r) + (0.715 * g) + (0.072 * b);
395 Z = (0.015 * r) + (0.090 * g) + (0.720 * b);
413 r = ( 3.202 * X) + (-1.543 * Y) + (-0.660 * Z);
414 g = (-0.959 * X) + ( 1.879 * Y) + ( 0.056 * Z);
415 b = ( 0.053 * X) + (-0.203 * Y) + ( 1.396 * Z);
457 chan[1] = chan[2] = 0;
516 chan[1] = chan[2] = chan[0];
530 chan[0] = chan[1] = chan[2] = 0;
538DoInit (
CMMStoragePtr storage, CMProfileRef srcProf, CMProfileRef dstProf, UInt32 srcTransform, UInt32 dstTransform)
541 CMAppleProfileHeader srcHdr;
542 CMAppleProfileHeader dstHdr;
546 err = CMGetProfileHeader(srcProf, &srcHdr);
547 require_noerr(err, bail);
549 err = CMGetProfileHeader(dstProf, &dstHdr);
550 require_noerr(err, bail);
552 storage->
srcSpace = (kDeviceToPCS) ? srcHdr.cm2.dataColorSpace : srcHdr.cm2.profileConnectionSpace;
553 storage->
srcClass = srcHdr.cm2.profileClass;
555 storage->
dstSpace = (kPCSToDevice) ? dstHdr.cm2.dataColorSpace : dstHdr.cm2.profileConnectionSpace;
556 storage->
dstClass = dstHdr.cm2.profileClass;
561 if (srcSpace == dstSpace) storage->
proc = NULL;
583 err = cmInvalidProfile;
585 require_noerr(err, bail);
597 CMAppleProfileHeader srcHdr;
598 CMAppleProfileHeader dstHdr;
602 err = CMGetProfileHeader(profileSet->profileSpecs[0].profile, &srcHdr);
603 require_noerr(err, bail);
605 err = CMGetProfileHeader(profileSet->profileSpecs[profileSet->profileCount-1].profile, &dstHdr);
606 require_noerr(err, bail);
608 storage->
srcSpace = (kDeviceToPCS) ? srcHdr.cm2.dataColorSpace : srcHdr.cm2.profileConnectionSpace;
609 storage->
srcClass = srcHdr.cm2.profileClass;
611 storage->
dstSpace = (kPCSToDevice) ? dstHdr.cm2.dataColorSpace : dstHdr.cm2.profileConnectionSpace;
612 storage->
dstClass = dstHdr.cm2.profileClass;
617 for (
int i=0; i<profileSet->profileCount; i++)
625 err = cmInvalidProfile;
626 require_noerr(err, bail);
635#pragma mark ------------------------------------------------------------------
636#pragma mark pre-Leopard entry points
637#pragma mark ------------------------------------------------------------------
640CMMOpen (uintptr_t* cmmRefcon,
void* hInstance)
642 #pragma unused (hInstance)
651 storage->
cmm =
new CIccCmm;
667 free((
void*)*cmmRefcon);
675NCMMInit (uintptr_t* cmmRefcon, CMProfileRef srcProf, CMProfileRef dstProf)
684 CMProfileRef srcProf = profileSet->profileSet[0];
685 CMProfileRef dstProf = profileSet->profileSet[profileSet->count-1];
692NCMMConcatInit (uintptr_t* cmmRefcon, NCMConcatProfileSet* profileSet, CMConcatCallBackUPP proc,
void* refCon)
694 CMProfileRef srcProf = profileSet->profileSpecs[0].profile;
695 CMProfileRef dstProf = profileSet->profileSpecs[profileSet->profileCount-1].profile;
697 UInt32 srcTransform = profileSet->profileSpecs[0].transformTag;
698 UInt32 dstTransform = profileSet->profileSpecs[profileSet->profileCount-1].transformTag;
712 matchInfo.
srcBuf[0] = ((UInt8*)colorBuf) + 0;
713 matchInfo.
srcBuf[1] = ((UInt8*)colorBuf) + 2;
714 matchInfo.
srcBuf[2] = ((UInt8*)colorBuf) + 4;
715 matchInfo.
srcBuf[3] = ((UInt8*)colorBuf) + 6;
721 matchInfo.
dstBuf[0] = ((UInt8*)colorBuf) + 0;
722 matchInfo.
dstBuf[1] = ((UInt8*)colorBuf) + 2;
723 matchInfo.
dstBuf[2] = ((UInt8*)colorBuf) + 4;
724 matchInfo.
dstBuf[3] = ((UInt8*)colorBuf) + 6;
737CMMMatchBitmap (uintptr_t* cmmRefcon, CMBitmap * srcMap, CMBitmapCallBackUPP progressProc,
void * refCon, CMBitmap* dstMap)
739 #pragma unused (progressProc, refCon)
745 if (srcMap==NULL || srcMap->image==NULL ||
746 dstMap==NULL || dstMap->image==NULL)
749 matchInfo.
height = srcMap->height;
750 matchInfo.
width = srcMap->width;
754 switch (srcMap->space)
757 srcSpace = cmGrayData;
758 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
759 matchInfo.
srcBuf[1] = NULL;
760 matchInfo.
srcBuf[2] = NULL;
761 matchInfo.
srcBuf[3] = NULL;
768 srcSpace = cmGrayData;
769 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
770 matchInfo.
srcBuf[1] = NULL;
771 matchInfo.
srcBuf[2] = NULL;
772 matchInfo.
srcBuf[3] = NULL;
778 srcSpace = cmRGBData;
779 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
780 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 1;
781 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 2;
782 matchInfo.
srcBuf[3] = NULL;
789 srcSpace = cmRGBData;
790 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 1;
791 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 2;
792 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 3;
793 matchInfo.
srcBuf[3] = NULL;
800 srcSpace = cmRGBData;
801 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
802 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 2;
803 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 4;
804 matchInfo.
srcBuf[3] = NULL;
810 srcSpace = cmCMYKData;
811 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
812 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 1;
813 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 2;
814 matchInfo.
srcBuf[3] = (UInt8*)srcMap->image + 3;
821 srcSpace = cmCMYKData;
822 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
823 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 2;
824 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 4;
825 matchInfo.
srcBuf[3] = (UInt8*)srcMap->image + 6;
831 srcSpace = cmLabData;
832 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
833 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 1;
834 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 2;
835 matchInfo.
srcBuf[3] = NULL;
842 srcSpace = cmLabData;
843 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
844 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 2;
845 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 4;
846 matchInfo.
srcBuf[3] = NULL;
852 srcSpace = cmXYZData;
853 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
854 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 1;
855 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 2;
856 matchInfo.
srcBuf[3] = NULL;
863 srcSpace = cmXYZData;
864 matchInfo.
srcBuf[0] = (UInt8*)srcMap->image + 0;
865 matchInfo.
srcBuf[1] = (UInt8*)srcMap->image + 2;
866 matchInfo.
srcBuf[2] = (UInt8*)srcMap->image + 4;
867 matchInfo.
srcBuf[3] = NULL;
873 return cmInvalidSrcMap;
878 switch (dstMap->space)
881 dstSpace = cmGrayData;
882 matchInfo.
dstBuf[0] = (UInt8*)srcMap->image + 0;
883 matchInfo.
dstBuf[1] = NULL;
884 matchInfo.
dstBuf[2] = NULL;
885 matchInfo.
dstBuf[3] = NULL;
892 dstSpace = cmGrayData;
893 matchInfo.
dstBuf[0] = (UInt8*)srcMap->image + 0;
894 matchInfo.
dstBuf[1] = NULL;
895 matchInfo.
dstBuf[2] = NULL;
896 matchInfo.
dstBuf[3] = NULL;
902 dstSpace = cmRGBData;
903 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 0;
904 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 1;
905 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 2;
906 matchInfo.
dstBuf[3] = NULL;
913 dstSpace = cmRGBData;
914 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 1;
915 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 2;
916 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 3;
917 matchInfo.
dstBuf[3] = NULL;
924 dstSpace = cmRGBData;
925 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 0;
926 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 2;
927 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 4;
928 matchInfo.
dstBuf[3] = NULL;
934 dstSpace = cmCMYKData;
935 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 0;
936 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 1;
937 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 2;
938 matchInfo.
dstBuf[3] = (UInt8*)dstMap->image + 3;
945 dstSpace = cmCMYKData;
946 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 0;
947 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 2;
948 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 4;
949 matchInfo.
dstBuf[3] = (UInt8*)dstMap->image + 6;
955 dstSpace = cmLabData;
956 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 0;
957 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 1;
958 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 2;
959 matchInfo.
dstBuf[3] = NULL;
966 dstSpace = cmLabData;
967 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 0;
968 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 2;
969 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 4;
970 matchInfo.
dstBuf[3] = NULL;
976 dstSpace = cmXYZData;
977 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 0;
978 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 1;
979 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 2;
980 matchInfo.
dstBuf[3] = NULL;
987 dstSpace = cmXYZData;
988 matchInfo.
dstBuf[0] = (UInt8*)dstMap->image + 0;
989 matchInfo.
dstBuf[1] = (UInt8*)dstMap->image + 2;
990 matchInfo.
dstBuf[2] = (UInt8*)dstMap->image + 4;
991 matchInfo.
dstBuf[3] = NULL;
997 return cmInvalidSrcMap;
1001 #if TARGET_RT_LITTLE_ENDIAN
1002 matchInfo.
srcSwap = ((srcMap->space & cmLittleEndianPacking) == 0);
1003 matchInfo.
dstSwap = ((dstMap->space & cmLittleEndianPacking) == 0);
1005 matchInfo.
srcSwap = ((srcMap->space & cmLittleEndianPacking) == cmLittleEndianPacking);
1006 matchInfo.
dstSwap = ((dstMap->space & cmLittleEndianPacking) == cmLittleEndianPacking);
1015CMMCheckColors (uintptr_t* cmmRefcon, CMColor *colorBuf, UInt32 count, UInt8* gamutResult)
1017 #pragma unused (cmmRefcon, colorBuf)
1019 UInt32 byteCount = (count + 7) / 8;
1020 memset(gamutResult, 0xFF, byteCount);
1026CMMCheckBitmap (uintptr_t* cmmRefcon,
const CMBitmap * srcMap, CMBitmapCallBackUPP progressProc,
void * refCon, CMBitmap* chkMap)
1028 #pragma unused (cmmRefcon, srcMap, progressProc, refCon, chkMap)
1033#pragma mark ------------------------------------------------------------------
1034#pragma mark Leopard entry points
1035#pragma mark ------------------------------------------------------------------
1037#define kCMMSTORAGE CFSTR("com.acme.DemoCMM")
1044 uintptr_t cmmStorage = (uintptr_t) NULL;
1048 CFDataRef data = (CFDataRef) CWColorWorldGetProperty (cw,
kCMMSTORAGE);
1052 cmmStorage = (uintptr_t) CFDataGetBytePtr (data);
1063 CMError err = paramErr;
1067 uintptr_t cmmStorage = (uintptr_t) NULL;
1069 if ((err =
CMMOpen (&cmmStorage, NULL)) == noErr)
1071 CFDataRef prop = CFDataCreateWithBytesNoCopy (NULL, (
const UInt8*) cmmStorage,
sizeof (cmmStorage),
CMMBytesDeallocator());
1097 CMError err = paramErr;
1113 CMError err = paramErr;
1127CMM_MatchBitmap (CMWorldRef cw, CMBitmap* srcMap, CMBitmapCallBackUPP progressProc,
void* refCon, CMBitmap* dstMap)
1129 CMError err = paramErr;
1135 err =
CMMMatchBitmap (&cmmStorage, srcMap, progressProc, refCon, dstMap);
1142CMError
CMM_CheckBitmap (CMWorldRef cw,
const CMBitmap* srcMap, CMBitmapCallBackUPP progressProc,
void* refCon, CMBitmap* chkMap)
1144 CMError err = paramErr;
1150 err =
CMMCheckBitmap (&cmmStorage, srcMap, progressProc, refCon, chkMap);
1168 return malloc(size);
1174 return realloc(ptr, size);
1180 void* cmmStorage = ptr;
1184 CMMClose ((uintptr_t*) &cmmStorage);
1208 static pthread_once_t once = PTHREAD_ONCE_INIT;
1286 CFDataRef data = CMProfileCopyICCData(NULL,pref);
1288 CIccProfile* prof =
ReadIccProfile(CFDataGetBytePtr(data),CFDataGetLength(data));
CIccProfile * ReadIccProfile(const icChar *szFilename, bool bUseSubProfile)
Name: ReadIccProfile.
CMError CMMMatchBitmap(uintptr_t *cmmRefcon, CMBitmap *srcMap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *dstMap)
static void MatchOne_Gray_CMYK(UInt16 *chan)
static uintptr_t GetCMMStorage(CMWorldRef cw)
static CFAllocatorRef cmmAllocator
static void MatchOne_LAB_Gray(UInt16 *chan)
CMError CMMCheckColors(uintptr_t *cmmRefcon, CMColor *colorBuf, UInt32 count, UInt8 *gamutResult)
CMError CMM_CheckColors(CMWorldRef cw, CMColor *myColors, UInt32 count, UInt8 *result)
static void MatchOne_CMYK_LAB(UInt16 *chan)
static void MatchOne_Gray_XYZ(UInt16 *chan)
CIccProfile * getIccProfLibProfileFromColorsyncProfile(CMProfileRef pref)
static void cmmdeallocate(void *ptr, void *info)
CMError CMM_MatchColors(CMWorldRef cw, CMColor *myColors, UInt32 count)
static void MatchOne_RGB_CMYK(UInt16 *chan)
CMError NCMMConcatInit(uintptr_t *cmmRefcon, NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc, void *refCon)
CMError CMM_MatchBitmap(CMWorldRef cw, CMBitmap *srcMap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *dstMap)
static void create_allocator(void)
static const CFAllocatorContext context
CMError CMMCheckBitmap(uintptr_t *cmmRefcon, const CMBitmap *srcMap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *chkMap)
static CMError DoInit(CMMStoragePtr storage, CMProfileRef srcProf, CMProfileRef dstProf, UInt32 srcTransform, UInt32 dstTransform)
static void * cmmallocate(CFIndex size, CFOptionFlags hint, void *info)
static void MatchOne_XYZ_Gray(UInt16 *chan)
static void MatchOne_LAB_CMYK(UInt16 *chan)
CMError CMM_CheckBitmap(CMWorldRef cw, const CMBitmap *srcMap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *chkMap)
static void MatchOne_RGB_LAB(UInt16 *chan)
static void MatchOne_Gray_LAB(UInt16 *chan)
CMError CMMOpen(uintptr_t *cmmRefcon, void *hInstance)
CMError NCMMInit(uintptr_t *cmmRefcon, CMProfileRef srcProf, CMProfileRef dstProf)
static void MatchOne_RGB_XYZ(UInt16 *chan)
static void MatchOne_XYZ_RGB(UInt16 *chan)
CMError CMMConcatInit(uintptr_t *cmmRefcon, CMConcatProfileSet *profileSet)
static void MatchOne_CMYK_Gray(UInt16 *chan)
static void MatchOne_LAB_XYZ(UInt16 *chan)
static void MatchOne_CMYK_XYZ(UInt16 *chan)
struct CMMStorageRec * CMMStoragePtr
static void MatchOne_Gray_RGB(UInt16 *chan)
CMError CMMMatchColors(uintptr_t *cmmRefcon, CMColor *colorBuf, UInt32 count)
static CFAllocatorRef CMMBytesDeallocator()
static void MatchOne_CMYK_RGB(UInt16 *chan)
CMError CMMClose(uintptr_t *cmmRefcon)
CMError CMM_ConcatColorWorld(CMWorldRef cw, NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc, void *refCon)
static void MatchOne_XYZ_CMYK(UInt16 *chan)
static void DoMatch(CMMStoragePtr storage, CMMMatchRec *pMatchInfo)
void(* MatchOneProc)(UInt16 *chan)
static void MatchOne_LAB_RGB(UInt16 *chan)
static void MatchOne_RGB_Gray(UInt16 *chan)
static void * cmmreallocate(void *ptr, CFIndex size, CFOptionFlags hint, void *info)
static CMError DoInitSampleICC(CMMStoragePtr storage, NCMConcatProfileSet *profileSet)
static void MatchOne_XYZ_LAB(UInt16 *chan)