[PATCH] problem with color management with mscms and gdi

Tomasz Michno tomek_m9 at interia.pl
Fri Oct 15 15:46:44 CDT 2010


From 0ab2cd83e02a4092dfbe79756e3254bcaa80a0f9 Mon Sep 17 00:00:00 
2001
From: Tomasz Michno <tomek_m9 at interia.pl>
Date: Fri, 15 Oct 2010 15:56:47 +0200
Subject: This patch repairs problems with displaying images with enabled color 
management created by gdi and mscms (vertical stripes, sometimes incorrect 
colors), for example in Pentax Photo Laboratory or SilkyPix Developer Studio 
(both tested with different images).
 My information about this problem and previous solution could be read on 
Pentax Photo Laboratory forum in CrossOver App Db:
 http://www.codeweavers.com/compatibility/browse/name/?app_id=5666;forum=1;msg=58159
 For applications which uses EnumICMProfiles to detect monitor icc profile, 
there should be a copy of monitor profile in 
windows\system32\spool\drivers\color\monitor.icc. If there is no monitor.icc 
in this directory, application works the same as if there were no color 
management enabled (but image is displayed ok).

---
 dlls/gdi32/icm.c       |    8 ++++++--
 dlls/mscms/transform.c |    2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/icm.c b/dlls/gdi32/icm.c
index 0e346ee..d75c528 100644
--- a/dlls/gdi32/icm.c
+++ b/dlls/gdi32/icm.c
@@ -44,7 +44,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(icm);
 INT WINAPI EnumICMProfilesA(HDC hdc, ICMENUMPROCA func, LPARAM 
lparam)
 {
 	FIXME("%p, %p, 0x%08lx stub\n", hdc, func, lparam);
-	return -1;
+	(*func)("C:
\\windows\\system32\\spool\\drivers\\color\\monitor.icc",lparam);
+	FIXME("partially fixed: force C:
\\windows\\system32\\spool\\drivers\\color\\monitor.icc\n");
+	return 1;
 }
 
 /***********************************************************************
@@ -53,7 +55,9 @@ INT WINAPI EnumICMProfilesA(HDC hdc, 
ICMENUMPROCA func, LPARAM lparam)
 INT WINAPI EnumICMProfilesW(HDC hdc, ICMENUMPROCW func, LPARAM 
lparam)
 {
 	FIXME("%p, %p, 0x%08lx stub\n", hdc, func, lparam);
-	return -1;
+	(*func)("C:
\\windows\\system32\\spool\\drivers\\color\\monitor.icc",lparam);
+	FIXME("partially fixed: force C:
\\windows\\system32\\spool\\drivers\\color\\monitor.icc\n");	
+	return 1;
 }
 
 /**********************************************************************
diff --git a/dlls/mscms/transform.c b/dlls/mscms/transform.c
index a795386..e7a3faa 100644
--- a/dlls/mscms/transform.c
+++ b/dlls/mscms/transform.c
@@ -65,6 +65,8 @@ static DWORD from_bmformat( BMFORMAT format )
     {
     case BM_RGBTRIPLETS: return TYPE_RGB_8;
     case BM_BGRTRIPLETS: return TYPE_BGR_8;
+    case BM_xRGBQUADS:   return TYPE_RGBA_8;
+    case BM_xBGRQUADS:   return TYPE_ABGR_8;     
     case BM_GRAY:        return TYPE_GRAY_8;
     default:
         if (quietfixme == 0)
-- 
1.7.1


----------------------------------------------------------------
Zobacz ile kosztuje m2 w Twoim miescie. Szukaj w bazie ogloszen!
http://linkint.pl/f281f




More information about the wine-patches mailing list