From: Klaus Ethgen Date: Sat, 27 Sep 2014 11:07:10 +0000 (+0100) Subject: Fix lcms2 integration X-Git-Tag: v1.2.1~3 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=3a1908c1db02aad60f9dc0f770c0761ef6499be8 Fix lcms2 integration Thanks Michael Schwendt for the bug reporting and the patch. --- diff --git a/src/color-man.c b/src/color-man.c index 7788c7a9..e4f1bab1 100644 --- a/src/color-man.c +++ b/src/color-man.c @@ -432,10 +432,12 @@ static gchar *color_man_get_profile_name(ColorManProfileType type, cmsHPROFILE p if (profile) { #ifdef HAVE_LCMS2 - cmsUInt8Number profileID[17]; - profileID[16] = '\0'; - cmsGetHeaderProfileID(profile, profileID); - return g_strdup((gchar *) profileID); + cmsUInt32Number r; + char buffer[20]; + buffer[0] = '\0'; + r = cmsGetProfileInfoASCII(profile, cmsInfoDescription, "en", "US", &buffer, 20); + buffer[19] = '\0'; /* Just to be sure */ + return g_strdup(buffer); #else return g_strdup(cmsTakeProductName(profile)); #endif