summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-19 05:56:16 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-19 05:56:25 +0100
commit9c0a4dbcd432a9c3fa9588ea9789c0ce0de48b34 (patch)
treef6b3eb2a8188dacb1c039dd079d4752125b2473f /examples
parentdoc (diff)
downloadblueshift-9c0a4dbcd432a9c3fa9588ea9789c0ce0de48b34.tar.gz
blueshift-9c0a4dbcd432a9c3fa9588ea9789c0ce0de48b34.tar.bz2
blueshift-9c0a4dbcd432a9c3fa9588ea9789c0ce0de48b34.tar.xz
add sigmoid to example
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/comprehensive13
1 files changed, 13 insertions, 0 deletions
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: