5 static cmsHPROFILE prof_xyz
,prof_rgb
;
6 static cmsHTRANSFORM trans_xyz_to_rgb
,trans_rgb_to_xyz
;
8 static DWORD WINAPI
make_trans_xyz_to_rgb(LPVOID lpParameter
)
10 trans_xyz_to_rgb
= cmsCreateTransform(
11 prof_xyz
,TYPE_XYZ_DBL
,
12 prof_rgb
,TYPE_RGB_DBL
,
13 INTENT_ABSOLUTE_COLORIMETRIC
,cmsFLAGS_NOTPRECALC
);
17 static DWORD WINAPI
make_trans_rgb_to_xyz(LPVOID lpParameter
)
19 trans_rgb_to_xyz
= cmsCreateTransform(
20 prof_rgb
,TYPE_RGB_DBL
,
21 prof_xyz
,TYPE_XYZ_DBL
,
22 INTENT_ABSOLUTE_COLORIMETRIC
,cmsFLAGS_NOTPRECALC
);
26 int WINAPI
WinMain(HINSTANCE hInstance
,HINSTANCE hPrevInstance
,LPSTR
27 lpCmdLine
,int nCmdShow
)
29 prof_xyz
= cmsCreateXYZProfile();
30 prof_rgb
= cmsOpenProfileFromFile("AdobeRGB1998.icc","rb");
31 //cmsCreate_sRGBProfile();
32 for (int i
=0;i
<10;++i
)
38 workers
[0] = CreateThread(NULL
,0,make_trans_xyz_to_rgb
,NULL
,0,&threadid
);
39 workers
[1] = CreateThread(NULL
,0,make_trans_rgb_to_xyz
,NULL
,0,&threadid
);
40 WaitForMultipleObjects(2,workers
,TRUE
,INFINITE
);
41 for (unsigned i
=0;i
<2;++i
)
42 CloseHandle(workers
[i
]);
44 make_trans_xyz_to_rgb(0);
45 make_trans_rgb_to_xyz(0);
47 cmsDeleteTransform(trans_xyz_to_rgb
);
48 cmsDeleteTransform(trans_rgb_to_xyz
);
50 cmsCloseProfile(prof_rgb
);
51 cmsCloseProfile(prof_xyz
);