[gnome-color-manager] roughly shape test window to instrument
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] roughly shape test window to instrument
- Date: Wed, 5 Feb 2014 14:50:51 +0000 (UTC)
commit 89612c5ed924ff0f6c9ae55bda2ebcb878d74686
Author: Pascal de Bruijn <pmjdebruijn pcode nl>
Date: Tue Feb 4 22:19:06 2014 +0100
roughly shape test window to instrument
these test window sizes were determined (as a snug fit) on a
roughly 120dpi display, so on more common 90-100dpi displays
the test window should have half an inch clearance allround
Signed-off-by: Richard Hughes <richard hughsie com>
src/gcm-calibrate-argyll.c | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 8ab2a59..266f9fe 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -269,6 +269,32 @@ gcm_calibrate_argyll_get_display_kind (GcmCalibrateArgyll *calibrate_argyll)
}
/**
+ * gcm_calibrate_argyll_get_sensor_test_window_size:
+ **/
+static const gchar *
+gcm_calibrate_argyll_get_sensor_test_window_size (GcmCalibrateArgyll *calibrate_argyll)
+{
+ CdSensorKind sensor_kind;
+
+ g_object_get (calibrate_argyll,
+ "sensor-kind", &sensor_kind,
+ NULL);
+
+ if (sensor_kind == CD_SENSOR_KIND_COLOR_MUNKI_PHOTO)
+ return "0.5,0.5,0.7,1.3";
+ if (sensor_kind == CD_SENSOR_KIND_I1_DISPLAY3)
+ return "0.5,0.5,0.5,0.9";
+ if (sensor_kind == CD_SENSOR_KIND_I1_DISPLAY2)
+ return "0.5,0.5,0.8,1.1";
+ if (sensor_kind == CD_SENSOR_KIND_COLOR_MUNKI_SMILE)
+ return "0.5,0.5,0.8,1.1";
+ if (sensor_kind == CD_SENSOR_KIND_COLORHUG)
+ return "0.5,0.5,0.5,0.7";
+
+ return "0.5,0.5,1.0,1.0";
+}
+
+/**
* gcm_calibrate_argyll_debug_argv:
**/
static void
@@ -403,7 +429,7 @@ gcm_calibrate_argyll_display_neutralise (GcmCalibrateArgyll *calibrate_argyll,
if (sensor_kind == CD_SENSOR_KIND_COLOR_MUNKI_PHOTO) {
g_ptr_array_add (array, g_strdup ("-H"));
}
- g_ptr_array_add (array, g_strdup ("-P 0.5,0.5,0.8"));
+ g_ptr_array_add (array, g_strdup_printf ("-P %s", gcm_calibrate_argyll_get_sensor_test_window_size
(calibrate_argyll)));
g_ptr_array_add (array, g_strdup (basename));
argv = gcm_utils_ptr_array_to_strv (array);
gcm_calibrate_argyll_debug_argv (command, argv);
@@ -608,7 +634,7 @@ gcm_calibrate_argyll_display_draw_and_measure (GcmCalibrateArgyll *calibrate_arg
g_ptr_array_add (array, g_strdup ("-H"));
g_ptr_array_add (array, g_strdup ("-N"));
}
- g_ptr_array_add (array, g_strdup ("-P 0.5,0.5,0.8"));
+ g_ptr_array_add (array, g_strdup_printf ("-P %s", gcm_calibrate_argyll_get_sensor_test_window_size
(calibrate_argyll)));
g_ptr_array_add (array, g_strdup (basename));
argv = gcm_utils_ptr_array_to_strv (array);
gcm_calibrate_argyll_debug_argv (command, argv);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]