Fix #314: Remote commands for thumbnail maintenance
[geeqie.git] / src / color-man.c
index 6c88a8f..e89fd14 100644 (file)
@@ -1,16 +1,24 @@
 /*
- * Geeqie
- * (C) 2006 John Ellis
- * Copyright (C) 2008 - 2012 The Geeqie Team
+ * Copyright (C) 2006 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
  * Author: John Ellis
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-
 #include "main.h"
 #include "color-man.h"
 
@@ -180,7 +188,7 @@ static ColorManCache *color_man_cache_new(ColorManProfileType in_type, const gch
                                           (has_alpha) ? TYPE_RGBA_8 : TYPE_RGB_8,
                                           cc->profile_out,
                                           (has_alpha) ? TYPE_RGBA_8 : TYPE_RGB_8,
-                                          INTENT_PERCEPTUAL, 0);
+                                          options->color_profile.render_intent, 0);
 
        if (!cc->transform)
                {
@@ -432,10 +440,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(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