From e9984680bd28d9642b697a32643b42d9fb83f1b7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 14 Feb 2014 18:40:44 +0100 Subject: add function start_over MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/curve.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/curve.py b/src/curve.py index f88dc87..e7832f3 100644 --- a/src/curve.py +++ b/src/curve.py @@ -300,6 +300,21 @@ def manipulate(r, g = None, b = None): curve[i] = f(curve[i]) +def start_over(): + ''' + Reverts all colours curves to identity mappings. + This intended for multi-monitor setups with different curves on each monitor. + If you have a multi-monitor setups without different curves then you have not + calibrated the monitors or you have awesome monitors that support hardware + gamma correction. + ''' + for i in range(i_size): + v = i / (i_size - 1) + r_curve[i] = v + g_curve[i] = v + b_curve[i] = v + + def clip(): ''' Clip all values below the actual minimum and above actual maximums -- cgit v1.2.3-70-g09d2