From 1ec97da0cdfc443b5c4e14161d602e7432481899 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 25 Feb 2014 14:42:45 +0100 Subject: add example logarithmic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/logarithmic | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/logarithmic (limited to 'examples/logarithmic') diff --git a/examples/logarithmic b/examples/logarithmic new file mode 100644 index 0000000..33b3ad8 --- /dev/null +++ b/examples/logarithmic @@ -0,0 +1,24 @@ +# -*- python -*- + +# This example uses free function modifier and temporary curve +# manipulation to make the colour curves logarithmic. + + +import math + +# Use linear RGB. +linearise() + +# Make the curves logarithmic. The function applies +# to all colour curves, but you can change them +# individually by specifing three functions: red, +# green and blue. +manipulate(lambda x : math.log(x + 1, 2)) + +# Switch back to sRGB. +standardise() + +# Apply settings, using vidmode. +vidmode() +#randr() + -- cgit v1.2.3-70-g09d2