increased maximum property size, added debug output.

2005-06-24  Sven Neumann  <sven@gimp.org>

	* modules/cdisplay_lcms.c (cdisplay_lcms_get_display_profile):
	increased maximum property size, added debug output.
This commit is contained in:
Sven Neumann
2005-06-24 13:41:07 +00:00
committed by Sven Neumann
parent eeebd95e41
commit fe0718ef58
2 changed files with 18 additions and 5 deletions

View File

@ -374,15 +374,23 @@ cdisplay_lcms_get_display_profile (CdisplayLcms *lcms,
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
if (gdk_property_get (gdk_screen_get_root_window (screen),
gdk_atom_intern ("_ICC_PROFILE", FALSE),
GDK_NONE,
0, 256 * 1024, FALSE,
&type, &format, &nitems, &data) && nitems > 0)
gdk_atom_intern ("_ICC_PROFILE", FALSE),
GDK_NONE,
0, 64 * 1024 * 1024, FALSE,
&type, &format, &nitems, &data) && nitems > 0)
{
cmsHPROFILE *profile = cmsOpenProfileFromMem (data, nitems);
cmsHPROFILE profile = cmsOpenProfileFromMem (data, nitems);
g_free (data);
if (profile)
{
const gchar *name = cmsTakeProductName (profile);
g_printerr ("obtained ICC profile from X server: %s\n",
name ? name : "<untitled>");
}
return profile;
}
}