summaryrefslogtreecommitdiffstats
path: root/src/icc.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-08-27 17:56:34 +0200
committerMattias Andrée <maandree@kth.se>2016-08-27 17:56:34 +0200
commitfb7bae1655af0a9f0f9dfc5bbd0e2ce56d964357 (patch)
tree99a69469bae38ccedd69f1b6d4b35e10c9818da0 /src/icc.py
parenttypo (diff)
downloadblueshift-fb7bae1655af0a9f0f9dfc5bbd0e2ce56d964357.tar.gz
blueshift-fb7bae1655af0a9f0f9dfc5bbd0e2ce56d964357.tar.bz2
blueshift-fb7bae1655af0a9f0f9dfc5bbd0e2ce56d964357.tar.xz
Fix ICC profile parsing
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/icc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/icc.py b/src/icc.py
index 61c0414..1d6ab0d 100644
--- a/src/icc.py
+++ b/src/icc.py
@@ -187,11 +187,11 @@ def parse_icc(content):
elif gamma_type == 1:
## The profile is encoded with gamma, brightness and contrast values
# Get the gamma, brightness and contrast for the red channel,
- (r_gamma, r_min, r_max) = [int_(read(4)) / 65535 for _ in range(3)]
+ (r_gamma, r_min, r_max) = [int_(read(4)) / 65536 for _ in range(3)]
# green channel
- (g_gamma, g_min, g_max) = [int_(read(4)) / 65535 for _ in range(3)]
+ (g_gamma, g_min, g_max) = [int_(read(4)) / 65536 for _ in range(3)]
# and blue channel.
- (b_gamma, b_min, b_max) = [int_(read(4)) / 65535 for _ in range(3)]
+ (b_gamma, b_min, b_max) = [int_(read(4)) / 65536 for _ in range(3)]
def f():
'''
Apply the gamma, brightness and contrast