RSS/Atom feed Twitter
Site is read-only, email is disabled

Primary monitor profile (Windows)

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Primary monitor profile (Windows) Yoshinori Yamakawa 11 Aug 23:11
  Primary monitor profile (Windows) Tor Lillqvist 12 Aug 00:35
Yoshinori Yamakawa
2007-08-11 23:11:01 UTC (over 17 years ago)

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;

Tor Lillqvist
2007-08-12 00:35:54 UTC (over 17 years ago)

Primary monitor profile (Windows)

Yoshinori Yamakawa writes:
> For example, it can read the primary monitor profile as follows:

Looks good. Please file this code in bugzilla.gnome.org attached to an enhancement request for GIMP.

--tml