Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. image color management

image color management

Scheduled Pinned Locked Moved C / C++ / MFC
helpadobejsonquestiondiscussion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muhammad Ahmed 0
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups