From 9c0a4dbcd432a9c3fa9588ea9789c0ce0de48b34 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 19 Mar 2014 05:56:16 +0100 Subject: add sigmoid to example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/comprehensive | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'examples/comprehensive') diff --git a/examples/comprehensive b/examples/comprehensive index 29070d4..54bb7ae 100644 --- a/examples/comprehensive +++ b/examples/comprehensive @@ -158,6 +158,15 @@ gamma_blue_day, gamma_blue_night, gamma_blue_default = [1], [1], [1] # the colour temperature is low. +# Sigmoid curve (S-curve) correction for the red, green and blue +# components, respectively, for each monitor. `None` means that +# no correct is should be applied. `...` means that the value +# above should be used. +sigmoid_red = [None] +sigmoid_green = [...] +sigmoid_blue = [...] + + # ICC profile for video filtering and monitor calibration, respectively. # Replace `None` with the pathname of the profile. It is assume that # the calibration profile is already applied and that you want it to @@ -242,6 +251,7 @@ doreset = parser.opts['--reset'] last_dayness = None +sigmoid_ = list(zip(sigmoid_red, sigmoid_green, sigmoid_blue)) def periodically(year, month, day, hour, minute, second, weekday, fade): ''' :(int, int, int, int, int, int, int, float?)?→void Place holder for periodically invoked function @@ -373,6 +383,9 @@ def periodically(year, month, day, hour, minute, second, weekday, fade): # Apply gamma correction to monitor. gamma(gamma_red_, gamma_green_, gamma_blue_) + # Apply sigmoid curve correction to monitor. + sigmoid(*(sigmoid_[m % len(sigmoid_)])) + # Apply ICC profile as a monitor calibration. i = m % len(icc_calibration_profile) if icc_calibration_profile[i] is not None: -- cgit v1.2.3-70-g09d2