[gimp/gimp-2-10] app: display profile name in "Color space" field of Image Properties.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: display profile name in "Color space" field of Image Properties.
- Date: Thu, 12 Nov 2020 00:03:10 +0000 (UTC)
commit 18fa6d3a2f5be91f72fc86f04587d7f03669cc4e
Author: Jehan <jehan girinstud io>
Date: Wed Nov 11 23:14:21 2020 +0100
app: display profile name in "Color space" field of Image Properties.
"RGB color" is not a color space, only the model. To get full color
space information, we want to display the model and associated profile
name.
Of course, the "Image Properties" dialog also has a tab displaying
details about the color profile. Still it's better if the general info
displays not too wrong label contents.
Note: when the used color profile has no name, it will show "(unnamed
profile)" which is still more informative than just the color model.
(cherry picked from commit b9ab461977b098200495e4385e6ca8075334b9b4)
app/widgets/gimpimagepropview.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpimagepropview.c b/app/widgets/gimpimagepropview.c
index 077eb36262..b5646b7f8c 100644
--- a/app/widgets/gimpimagepropview.c
+++ b/app/widgets/gimpimagepropview.c
@@ -25,6 +25,7 @@
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
+#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "widgets-types.h"
@@ -413,6 +414,7 @@ static void
gimp_image_prop_view_update (GimpImagePropView *view)
{
GimpImage *image = view->image;
+ GimpColorProfile *profile;
GimpImageBaseType type;
GimpPrecision precision;
GimpUnit unit;
@@ -457,9 +459,8 @@ gimp_image_prop_view_update (GimpImagePropView *view)
unit == GIMP_UNIT_INCH ? _("ppi") : format_buf);
gtk_label_set_text (GTK_LABEL (view->resolution_label), buf);
- /* color type */
+ /* color space */
type = gimp_image_get_base_type (image);
-
gimp_enum_get_value (GIMP_TYPE_IMAGE_BASE_TYPE, type,
NULL, NULL, &desc, NULL);
@@ -467,7 +468,9 @@ gimp_image_prop_view_update (GimpImagePropView *view)
{
case GIMP_RGB:
case GIMP_GRAY:
- g_snprintf (buf, sizeof (buf), "%s", desc);
+ profile = gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (image));
+ g_snprintf (buf, sizeof (buf), "%s: %s", desc,
+ gimp_color_profile_get_label (profile));
break;
case GIMP_INDEXED:
g_snprintf (buf, sizeof (buf),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]