image color management
-
i'll be extremely gratefull to the people who try to help me . My question is regarding the use of icm 2 api and is listed below i am trying to find colors that are out of printer gamut using icm 2.0 using the following code /*Getting color profile handles*/ HPROFILE hICMMonitorProfile =OpenColorProfile(&input_profile_struc, PROFILE_READ,FILE_SHARE_READ, OPEN_EXISTING); HPROFILE hICMOutPutProfile =OpenColorProfile(&output_profile_struc, PROFILE_READ,FILE_SHARE_READ, OPEN_EXISTING); if (hICMMonitorProfile == NULL||hICMOutPutProfile == NULL) { AfxMessageBox("OpenColorProfile() failed"); } /////////////////////////////////////////////////////////////////////// / /// /*Creating color transform*/ LOGCOLORSPACE lcs = { LCS_SIGNATURE, 0x400, sizeof(LOGCOLORSPACE) }; lcs.lcsCSType = LCS_WINDOWS_COLOR_SPACE; lcs.lcsIntent = LCS_GM_GRAPHICS; m_hICMColorTransform =CreateColorTransform(&lcs, hICMMonitorProfile,hICMOutPutProfile,ENABLE_GAMUT_ CHECKING|INTENT_RELAT I VE_COLORIMETRIC); if (m_hICMColorTransform == NULL) { AfxMessageBox("ICM CreateColorTransform() failed"); } /*checking RGB colors ,if they out of printer gamut , using code as follows*/ //getting RGB color values from sliders ICMInColor.rgb.red=m_R.GetPos(); ICMInColor.rgb.green=m_G.GetPos(); ICMInColor.rgb.blue=m_B.GetPos(); BYTE bytearray[1]; bytearray[0]=0; CheckColors(m_hICMColorTransform,&ICMInColor,1,COLOR_RGB,bytearray); if(bytearray[0]!=0) { //the color is now of of gamut //according to my perception:-) } this code never shows any value as out of gamut however when i use that same profiles in photoshop ,the results are far away...different from it can anyone please help me ,solve this problem and also tell me any forums relating to icm discussion ahmed