summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2013-06-26 11:31:27 +0100
committerRichard Hughes <richard@hughsie.com>2013-06-26 11:34:23 +0100
commit8573e48b0518337bd2cc4ef0b13c8e5801890958 (patch)
treeaf5bb034c8d9924cb3fda0402db9da30f953359d
parent9f0229b03f7ae99087cb1799fec098127ba765fa (diff)
downloadcolord-8573e48b0518337bd2cc4ef0b13c8e5801890958.tar.gz
Show the viewing conditions when dumping the ICC profile
-rw-r--r--lib/colord/cd-icc.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/colord/cd-icc.c b/lib/colord/cd-icc.c
index 585844b..d7e7345 100644
--- a/lib/colord/cd-icc.c
+++ b/lib/colord/cd-icc.c
@@ -437,6 +437,54 @@ cd_icc_to_string (CdIcc *icc)
}
break;
}
+ case cmsSigViewingConditionsType:
+ {
+ cmsICCViewingConditions *v;
+ v = cmsReadTag(priv->lcms_profile, sig);
+ if (v == NULL) {
+ g_warning ("cannot read view tag");
+ continue;
+ }
+ g_string_append_printf (str, "ViewingCondition:\n");
+ g_string_append (str, " Illuminant Type: ");
+ switch (v->IlluminantType) {
+ case cmsILLUMINANT_TYPE_D50:
+ g_string_append (str, "D50\n");
+ break;
+ case cmsILLUMINANT_TYPE_D65:
+ g_string_append (str, "D65\n");
+ break;
+ case cmsILLUMINANT_TYPE_D93:
+ g_string_append (str, "D93\n");
+ break;
+ case cmsILLUMINANT_TYPE_F2:
+ g_string_append (str, "F2\n");
+ break;
+ case cmsILLUMINANT_TYPE_D55:
+ g_string_append (str, "D55\n");
+ break;
+ case cmsILLUMINANT_TYPE_A:
+ g_string_append (str, "A\n");
+ break;
+ case cmsILLUMINANT_TYPE_E:
+ g_string_append (str, "E\n");
+ break;
+ case cmsILLUMINANT_TYPE_F8:
+ g_string_append (str, "F8\n");
+ break;
+ default:
+ g_string_append (str, "Unknown\n");
+ }
+ g_string_append_printf (str, " Illuminant: X:%f Y:%f Z:%f\n",
+ v->IlluminantXYZ.X,
+ v->IlluminantXYZ.Y,
+ v->IlluminantXYZ.Z);
+ g_string_append_printf (str, " Surround: X:%f Y:%f Z:%f\n",
+ v->SurroundXYZ.X,
+ v->SurroundXYZ.Y,
+ v->SurroundXYZ.Z);
+ break;
+ }
case cmsSigDictType:
{
cmsHANDLE dict;