summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-16 18:31:01 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-16 18:31:01 +0100
commitda67a3b4652dfd8f61999e83b43896a23cc08fc5 (patch)
tree081b8bf95c2268ed1b50ed1fb762dbf21a582682 /src
parentcie_invert takes only one argument (diff)
downloadblueshift-da67a3b4652dfd8f61999e83b43896a23cc08fc5.tar.gz
blueshift-da67a3b4652dfd8f61999e83b43896a23cc08fc5.tar.bz2
blueshift-da67a3b4652dfd8f61999e83b43896a23cc08fc5.tar.xz
fix cie_invert
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/curve.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/curve.py b/src/curve.py
index cac2b53..23a77cb 100644
--- a/src/curve.py
+++ b/src/curve.py
@@ -389,11 +389,12 @@ def cie_invert(r = True, g = None, b = None):
'''
if g is None: g = r
if b is None: b = r
- for (curve, setting) in curves(r, g, b):
- if setting:
- for i in range(i_size):
- (x, y, Y) = srgb_to_ciexyy(r_curve[i], g_curve[i], b_curve[i])
- (r_curve[i], g_curve[i], b_curve[i]) = ciexyy_to_srgb(x, y, 1 - Y)
+ for i in range(i_size):
+ (x, y, Y) = srgb_to_ciexyy(r_curve[i], g_curve[i], b_curve[i])
+ (r_, g_, b_) = ciexyy_to_srgb(x, y, 1 - Y)
+ if r: r_curve[i] = r_
+ if g: g_curve[i] = g_
+ if b: b_curve[i] = b_
def sigmoid(r, g, b):