Primary monitor profile (Windows)
Hi,
Will the GIMP get possible to use the monitor color profile specified at the
monitor properties on Windows?
For example, it can read the primary monitor profile as follows:
--- cdisplay_lcms.c.orig Sat Aug 11 23:07:54 2007
+++ cdisplay_lcms.c Sun Aug 12 05:03:51 2007
@@ -26,6 +26,10 @@
#include
#endif
+#ifdef G_OS_WIN32
+#include
+#endif
+
#include
#include "libgimpcolor/gimpcolor.h"
@@ -443,9 +447,29 @@
g_free (data);
}
}
+#elif defined G_OS_WIN32
+ if (config->display_profile_from_gdk)
+ {
+ HDC hdc = GetDC (NULL);
+
+ if (hdc)
+ {
+ gchar *path;
+ gint32 len = 0;
+
+ GetICMProfile (hdc, &len, NULL);
+ path = g_new (gchar, len);
+
+ if (GetICMProfile (hdc, &len, path))
+ profile = cmsOpenProfileFromFile (path, "r");
+
+ g_free (path);
+ ReleaseDC (NULL, hdc);
+ }
+ }
#endif
- if (config->display_profile)
+ if (!profile && config->display_profile)
profile = cmsOpenProfileFromFile (config->display_profile, "r");
return profile;