diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-16 18:31:01 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-16 18:31:01 +0100 |
commit | da67a3b4652dfd8f61999e83b43896a23cc08fc5 (patch) | |
tree | 081b8bf95c2268ed1b50ed1fb762dbf21a582682 /src | |
parent | cie_invert takes only one argument (diff) | |
download | blueshift-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.py | 11 |
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): |