summaryrefslogtreecommitdiff
path: root/contrib/session-helper
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2013-02-27 13:13:31 +0000
committerRichard Hughes <richard@hughsie.com>2013-02-27 13:13:31 +0000
commit47d3274c339aaf53ca0cba340b0c2d6fbf6da15e (patch)
treed3984c5b3533817213e367d5eb6b6f50f362a3a9 /contrib/session-helper
parenta579108442984831b08c0057573cb5a69c6c2836 (diff)
downloadcolord-47d3274c339aaf53ca0cba340b0c2d6fbf6da15e.tar.gz
session-helper: Save the absolute XYZ value of the white sample
Diffstat (limited to 'contrib/session-helper')
-rw-r--r--contrib/session-helper/cd-main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/session-helper/cd-main.c b/contrib/session-helper/cd-main.c
index b07e366..a6d1a84 100644
--- a/contrib/session-helper/cd-main.c
+++ b/contrib/session-helper/cd-main.c
@@ -53,6 +53,7 @@ typedef struct {
CdSensorCap device_kind;
GPtrArray *array;
cmsCIEXYZ whitepoint;
+ CdColorXYZ absolute_white;
gdouble native_whitepoint;
gdouble target_gamma;
guint target_whitepoint;
@@ -398,6 +399,11 @@ cd_main_calib_get_native_whitepoint (CdMainPrivate *priv,
if (!ret)
goto out;
+ /* save the absolute XYZ measurement so we can scale each sample->Y
+ * to 1.0 for the gamma error check */
+ cd_color_xyz_copy (&xyz, &priv->absolute_white);
+ g_debug ("Absolute white: %f", priv->absolute_white.Y);
+
cmsXYZ2xyY (&chroma, (cmsCIEXYZ *) &xyz);
g_debug ("x:%f,y:%f,Y:%f", chroma.x, chroma.y, chroma.Y);
cmsTempFromWhitePoint (temp, &chroma);