diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-19 03:43:56 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-19 03:43:56 +0100 |
commit | f19e33d560026dde017533dd68c58e1a44648daa (patch) | |
tree | 51dc65632e1901c0df59f83446373b93a00b25fc /src | |
parent | split ramps_to_function into ramps_to_function and functionise (diff) | |
download | blueshift-f19e33d560026dde017533dd68c58e1a44648daa.tar.gz blueshift-f19e33d560026dde017533dd68c58e1a44648daa.tar.bz2 blueshift-f19e33d560026dde017533dd68c58e1a44648daa.tar.xz |
add store and restore
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/aux.py | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -64,3 +64,21 @@ def functionise(rgb): curve[i] = cur[y] return lambda : fcurve(*rgb) + +def store(): + ''' + Store the current adjustments + + @return :(r:float, g:float, b:float) The colour curves + ''' + return (r_curve[:], g_curve[:], b_curve[:]) + + +def restore(rgb): + ''' + Discard any currently applied adjustments and apply stored adjustments + + @param rgb:(r:float, g:float, b:float) The colour curves to restore + ''' + (r_curve[:], g_curve[:], b_curve[:]) = rgb + |