[Bug 19647] New: mscms: GetStandardColorSpaceProfileW() profile id handling incorrect (LCS_sRGB and LCS_WINDOWS_COLOR_SPACE)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Aug 9 11:54:40 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=19647

           Summary: mscms: GetStandardColorSpaceProfileW() profile id
                    handling incorrect (LCS_sRGB and
                    LCS_WINDOWS_COLOR_SPACE)
           Product: Wine
           Version: 1.1.27
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net


Hello,

various .NET 3.x apps fail to init because GetStandardColorSpaceProfileW()
doesn't work as expected.

--- snip ---
...
0029:Call
mscms.GetStandardColorSpaceProfileW(00000000,73524742,00185110,00184f08)
ret=0036bf3f
0029:trace:mscms:GetStandardColorSpaceProfileW ( 0x73524742, 0x185110, 0x184f08
)
0029:trace:mscms:GetColorDirectoryW ( 0x32d9c8, 0x32d9c4 )
0029:Call KERNEL32.GetSystemDirectoryW(0032d784,00000100) ret=4340b8ff
0029:Ret  KERNEL32.GetSystemDirectoryW() retval=00000013 ret=4340b8ff
0029:Call KERNEL32.lstrcatW(0032d784 L"C:\\windows\\system32",43411b40
L"\\spool\\drivers\\color") ret=4340b91a
0029:Ret  KERNEL32.lstrcatW() retval=0032d784 ret=4340b91a
0029:Call KERNEL32.lstrlenW(0032d784
L"C:\\windows\\system32\\spool\\drivers\\color") ret=4340b92b
0029:Ret  KERNEL32.lstrlenW() retval=00000027 ret=4340b92b
0029:Call KERNEL32.lstrcpyW(0032d9c8,0032d784
L"C:\\windows\\system32\\spool\\drivers\\color") ret=4340b958
0029:Ret  KERNEL32.lstrcpyW() retval=0032d9c8 ret=4340b958
0029:Call KERNEL32.SetLastError(00000002) ret=4340c31a
0029:Ret  KERNEL32.SetLastError() retval=00000002 ret=4340c31a
0029:Ret  mscms.GetStandardColorSpaceProfileW() retval=00000000 ret=0036bf3f 
...
--- snip ---

--- snip dlls/mscms/profile.c ---
BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR
profile, PDWORD size )
{
    static const WCHAR rgbprofilefile[] =
        { '\\','s','r','g','b',' ','c','o','l','o','r',' ',
          's','p','a','c','e',' ','p','r','o','f','i','l','e','.','i','c','m',0
}; 
...
    GetColorDirectoryW( machine, rgbprofile, &len );

    switch (id)
    {
        case SPACE_RGB: /* 'RGB ' */
            lstrcatW( rgbprofile, rgbprofilefile );
            len = lstrlenW( rgbprofile ) * sizeof(WCHAR);

            if (*size < len || !profile)
            {
                *size = len;
                SetLastError( ERROR_MORE_DATA );
                return FALSE;
            }

            lstrcpyW( profile, rgbprofile );
            break;

        default:
            SetLastError( ERROR_FILE_NOT_FOUND );
            return FALSE;
    } 
...
--- snip dlls/mscms/profile.c ---

This doesn't look right.

MSDN info: http://msdn.microsoft.com/en-us/library/dd372087.aspx

--- quote ---
dwProfileID

    Specifies the ID value of the standard color space for which to retrieve
the profile. The only valid values for this parameter are LCS_sRGB and
LCS_WINDOWS_COLOR_SPACE.
--- quote ---

You might also want to have a look at "Windows Metafile Format Specification":

[MS-WMF] — v20090630 (afaik latest one):

http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/%5BMS-WMF%5D.pdf

--- quote ---
2.1.1.14    LogicalColorSpace Enumeration

  The LogicalColorSpace Enumeration specifies the type of color space. <14>
    typedef enum
    {
      LCS_CALIBRATED_RGB = 0x00000000,
      LCS_sRGB = 0x73524742,
      LCS_WINDOWS_COLOR_SPACE = 0x57696E20
    } LogicalColorSpace;
     LCS_CALIBRATED_RGB: Color values are calibrated red green blue (RGB)
values.
     LCS_sRGB: The value is an encoding of the ASCII characters "sRGB", and it
indicates that the
        color values are sRGB values.
     LCS_WINDOWS_COLOR_SPACE: The value is an encoding of the ASCII characters
"Win ",
        including the trailing space, and it indicates that the color values
are Windows default color
        space values.
--- quote ---

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list