diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-02-28 03:25:02 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-02-28 03:25:02 +0000 |
commit | 621ab70b9fb53b8ffcfcbdd9c9e6b8eb522f1a01 (patch) | |
tree | 737f6f72252f8524a3a64c418504a926c337fafb /lib | |
parent | 51688921cf3b04970a4d4e6a15d592023653ce56 (diff) | |
download | netpbm-mirror-621ab70b9fb53b8ffcfcbdd9c9e6b8eb522f1a01.tar.gz netpbm-mirror-621ab70b9fb53b8ffcfcbdd9c9e6b8eb522f1a01.tar.xz netpbm-mirror-621ab70b9fb53b8ffcfcbdd9c9e6b8eb522f1a01.zip |
whitespace
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3161 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pm_gamma.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/pm_gamma.h b/lib/pm_gamma.h index 6630e05c..3c48e52e 100644 --- a/lib/pm_gamma.h +++ b/lib/pm_gamma.h @@ -17,8 +17,8 @@ pm_gamma709(float const intensity) { /* Here are parameters of the gamma transfer function for the Netpbm formats. This is CIE Rec 709. - - This transfer function is linear for sample values 0 .. .018 + + This transfer function is linear for sample values 0 .. .018 and an exponential for larger sample values. The exponential is slightly stretched and translated, though, unlike the popular pure exponential gamma transfer function. @@ -26,7 +26,7 @@ pm_gamma709(float const intensity) { float const gamma = 2.2; float const oneOverGamma = 1.0 / gamma; float const linearCutoff = 0.018; - float const linearExpansion = + float const linearExpansion = (1.099 * pow(linearCutoff, oneOverGamma) - 0.099) / linearCutoff; float brightness; @@ -49,9 +49,9 @@ pm_ungamma709(float const brightness) { float const gamma = 2.2; float const oneOverGamma = 1.0 / gamma; float const linearCutoff = 0.018; - float const linearExpansion = + float const linearExpansion = (1.099 * pow(linearCutoff, oneOverGamma) - 0.099) / linearCutoff; - + float intensity; if (brightness < linearCutoff * linearExpansion) |