summaryrefslogtreecommitdiffstats
path: root/src/curve.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-14 18:40:44 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-14 18:40:44 +0100
commite9984680bd28d9642b697a32643b42d9fb83f1b7 (patch)
tree9dc4245b2f8ad9e7d9194681e76d61b51e2345a7 /src/curve.py
parentm (diff)
downloadblueshift-e9984680bd28d9642b697a32643b42d9fb83f1b7.tar.gz
blueshift-e9984680bd28d9642b697a32643b42d9fb83f1b7.tar.bz2
blueshift-e9984680bd28d9642b697a32643b42d9fb83f1b7.tar.xz
add function start_over
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/curve.py15
1 files changed, 15 insertions, 0 deletions
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