about summary refs log tree commit diff
path: root/editor/pnmgamma.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-06-28 15:12:40 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-06-28 15:12:40 +0000
commit18f7275cb7726939aacbffd59ee23ea5aa7929b3 (patch)
tree79f137ea529245652830831a4f13f3eb3f2062c2 /editor/pnmgamma.c
parent8db29e17c89162f47555f9d3a9ea15e25f338fa7 (diff)
downloadnetpbm-mirror-18f7275cb7726939aacbffd59ee23ea5aa7929b3.tar.gz
netpbm-mirror-18f7275cb7726939aacbffd59ee23ea5aa7929b3.tar.xz
netpbm-mirror-18f7275cb7726939aacbffd59ee23ea5aa7929b3.zip
Release 10.35.96
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@2582 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pnmgamma.c')
-rw-r--r--editor/pnmgamma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/pnmgamma.c b/editor/pnmgamma.c
index e13075ff..efdfe039 100644
--- a/editor/pnmgamma.c
+++ b/editor/pnmgamma.c
@@ -509,7 +509,7 @@ buildBt709ToSrgbGamma(xelval       table[],
         else
             radiance = pow((normalized + 0.099) / 1.099, gamma709);
 
-        if (radiance < linearCutoffSrgb)
+        if (radiance < linearCutoffSrgb * normalizer)
             srgb = radiance * linearExpansionSrgb;
         else
             srgb = 1.055 * pow(normalized, oneOverGammaSrgb) - 0.055;
@@ -563,7 +563,7 @@ buildSrgbToBt709Gamma(xelval       table[],
         else
             radiance = pow((normalized + 0.099) / 1.099, gammaSrgb);
 
-        if (radiance < linearCutoff709)
+        if (radiance < linearCutoff709 * normalizer)
             bt709 = radiance * linearExpansion709;
         else
             bt709 = 1.055 * pow(normalized, oneOverGamma709) - 0.055;