[gnome-color-manager] trivial: use a different number of patches depending on what kind of device we are profiling
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: use a different number of patches depending on what kind of device we are profiling
- Date: Wed, 24 Feb 2010 18:17:45 +0000 (UTC)
commit bc894d9b9bc9462b2776e55a1c07a211b1185e98
Author: Richard Hughes <richard hughsie com>
Date: Wed Feb 24 18:13:02 2010 +0000
trivial: use a different number of patches depending on what kind of device we are profiling
src/gcm-calibrate-argyll.c | 35 +++++++++++++++++++++++++++++------
1 files changed, 29 insertions(+), 6 deletions(-)
---
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 7271b77..47c7dde 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -143,21 +143,38 @@ gcm_calibrate_argyll_get_quality_arg (GcmCalibrateArgyll *calibrate_argyll)
}
/**
- * gcm_calibrate_argyll_precision_to_patches_arg:
+ * gcm_calibrate_argyll_display_get_patches_arg:
**/
static const gchar *
-gcm_calibrate_argyll_precision_to_patches_arg (GcmCalibrateArgyllPrecision precision)
+gcm_calibrate_argyll_display_get_patches_arg (GcmCalibrateArgyll *calibrate_argyll)
{
- if (precision == GCM_CALIBRATE_ARGYLL_PRECISION_SHORT)
+ GcmCalibrateArgyllPrivate *priv = calibrate_argyll->priv;
+ if (priv->precision == GCM_CALIBRATE_ARGYLL_PRECISION_SHORT)
return "-f100";
- if (precision == GCM_CALIBRATE_ARGYLL_PRECISION_NORMAL)
+ if (priv->precision == GCM_CALIBRATE_ARGYLL_PRECISION_NORMAL)
return "-f250";
- if (precision == GCM_CALIBRATE_ARGYLL_PRECISION_LONG)
+ if (priv->precision == GCM_CALIBRATE_ARGYLL_PRECISION_LONG)
return "-f500";
return "-f250";
}
/**
+ * gcm_calibrate_argyll_printer_get_patches_arg:
+ **/
+static const gchar *
+gcm_calibrate_argyll_printer_get_patches_arg (GcmCalibrateArgyll *calibrate_argyll)
+{
+ GcmCalibrateArgyllPrivate *priv = calibrate_argyll->priv;
+ if (priv->precision == GCM_CALIBRATE_ARGYLL_PRECISION_SHORT)
+ return "-f90";
+ if (priv->precision == GCM_CALIBRATE_ARGYLL_PRECISION_NORMAL)
+ return "-f180";
+ if (priv->precision == GCM_CALIBRATE_ARGYLL_PRECISION_LONG)
+ return "-f360";
+ return "-f210";
+}
+
+/**
* gcm_calibrate_argyll_get_colorimeter_image_attach:
**/
static const gchar *
@@ -585,7 +602,13 @@ gcm_calibrate_argyll_display_generate_patches (GcmCalibrateArgyll *calibrate_arg
/* video RGB */
g_ptr_array_add (array, g_strdup ("-d3"));
}
- g_ptr_array_add (array, g_strdup (gcm_calibrate_argyll_precision_to_patches_arg (priv->precision)));
+
+ /* get number of patches */
+ if (device_type == GCM_DEVICE_TYPE_ENUM_DISPLAY)
+ g_ptr_array_add (array, g_strdup (gcm_calibrate_argyll_display_get_patches_arg (calibrate_argyll)));
+ else if (device_type == GCM_DEVICE_TYPE_ENUM_PRINTER)
+ g_ptr_array_add (array, g_strdup (gcm_calibrate_argyll_printer_get_patches_arg (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]