[gnome-color-manager] Fix calculating the RGB color for native calibration



commit 1dbb3b4433bdd071cf3ba40c5175d97da823db1e
Author: Richard Hughes <richard hughsie com>
Date:   Wed Nov 16 16:53:58 2011 +0000

    Fix calculating the RGB color for native calibration

 src/gcm-calibrate.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index 12c909b..5d02ad6 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -494,11 +494,14 @@ gcm_calibrate_display_characterize (GcmCalibrate *calibrate,
 		col = cmsIT8FindDataFormat(ti1, "SAMPLE_ID");
 		sample_id = cmsIT8GetDataRowCol(ti1, i, col);
 		col = cmsIT8FindDataFormat(ti1, "RGB_R");
-		rgb.R = cmsIT8GetDataRowColDbl(ti1, i, col);
+		rgb.R = cmsIT8GetDataRowColDbl(ti1, i, col) / 100.0f;
 		col = cmsIT8FindDataFormat(ti1, "RGB_G");
-		rgb.G = cmsIT8GetDataRowColDbl(ti1, i, col);
+		rgb.G = cmsIT8GetDataRowColDbl(ti1, i, col) / 100.0f;
 		col = cmsIT8FindDataFormat(ti1, "RGB_B");
-		rgb.B = cmsIT8GetDataRowColDbl(ti1, i, col);
+		rgb.B = cmsIT8GetDataRowColDbl(ti1, i, col) / 100.0f;
+
+		g_debug ("Using source color %f,%f,%f",
+			 rgb.R, rgb.G, rgb.B);
 
 		/* set the window color */
 		gcm_sample_window_set_color (GCM_SAMPLE_WINDOW (priv->sample_window), &rgb);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]