Hi,

> [...] and want to load the currently selected monitor
> profile rather than use the generic "sRGB" profile, but I can't find
> where Windows stores this information.

Take a look on the function GetICMProfile() from WIN32 API. 
You have to give a suitable DC for the display. Remember some 
machines may have more than one monitor, so you have to specify 
a DC for the display you want to get the profile.

Here is a snippet in C:

LPSTR GetDefaultICMProfile(HDC hDC)
{
    BOOL      bProfile;
    DWORD     dwProfileLen;
    char      szProfileName[MAX_PATH+1];


    dwProfileLen = MAX_PATH; szProfileName[0] = '\0';
    SetICMMode(hDC, ICM_ON);
    bProfile = GetICMProfile(hDC, (LPDWORD) &dwProfileLen, szProfileName);

    if (!bProfile)
    {
        DebugMsg("GetDefaultICMProfile:  GetICMProfile returned FALSE on query, 
dwProfileLen = %ld\r\n", dwProfileLen);
        DISPLAY_LASTERROR(GetLastError());
        return NULL;
    }

    DebugMsg("Full profile name:  <%s>\r\n", szProfileName);

    return strdup(szProfileName);
}

Hope this helps
Marti Maria
The little cms project
http://www.littlecms.com


----- Original Message ----- 
From: "Moretti, Giovanni" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, February 02, 2005 12:30 AM
Subject: [Lcms-user] Finding "Default" Windows monitor profile - how?


> Hi
> 
> I've been using Delphi to create some colour managed objects using LCMS
> (wonderful thanks Marti) and want to load the currently selected monitor
> profile rather than use the generic "sRGB" profile, but I can't find
> where Windows stores this information.
> 
> I have found a list of profiles in the registry at:
> 
> HKEY_LOCAL_MACHINE/SOFTWARE/MICROSOFT/Windows NT/ICM 
> which has subkeys:
> 
>   /mntr   <= Contains lots of monitor profiles
>   /prtr
>   /scnr
>   /spac
> 
> The "mntr" subkey includes the currently selected monitor profile
> there's no obvious indication of how it know which of the dozen or so is
> actually the default.
>  
> I'm appreciate a pointer to where the various versions of Windows stores
> the default profile, so I can load the correct file. 
> 
> I'm using Windows XP,but would like the locations for Windows 2000 and
> Windows 98SE (from memory it supported colour management) if possible.
> 
> Thanks
> Giovanni
> ========================================================================
> Giovanni Moretti  |  Institute of Information Sciences and Technology
> Senior Lecturer   |  Massey University, Palmerston North, New Zealand
> Computer Science  |  Ph 64-6-3505799x2474 == Fax 64-6-3502259 == ZL2BOI 
> ------------------------------------------------------------------------
>  http://www-ist.massey.ac.nz/moretti      mailto:[EMAIL PROTECTED]
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Lcms-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lcms-user
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Lcms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to