POV-Ray : Newsgroups : povray.binaries.images : I think warp is right ... 3.7 gamma : Re: I think warp is right ... 3.7 gamma Server Time
31 Jul 2024 20:15:58 EDT (-0400)
  Re: I think warp is right ... 3.7 gamma  
From: clipka
Date: 3 Sep 2009 16:29:37
Message: <4aa02731@news.povray.org>
Warp schrieb:
>   So you are basically saying that all the other image file formats
> except PNG are the broken ones.

No, what I'm saying is that they're inferior, not that they're broken. 
Just like I wouldn't call GIF broken because it can only represent 256 
different colors, I wouldn't call some image file format broken just 
because it does not explicitly specify the gamma pre-correction that was 
applied to its content.

Furthermore, this inferiority doesn't apply to "all the other image file 
formats": HDR and OpenEXR are gamma-aware as well (with the latter 
mandating strictly linear encoding IIRC).

Even JPEG /could/ be used in a gamma-aware fashion, as it allows to 
embed color profiles, which goes even a step further. Unfortunately 
POV-Ray doesn't seem to make any use of this feature, neither for output 
nor for input.


>   OTOH, the only way one can match POV-Ray-generated pixel colors with,
> for example, the pixel color in an existing JPEG image or with HTML
> colors is to use File_Gamma=1.0 and bypass the "correction" that POV-Ray
> is doing, by either rendering to TGA, or removing the gamma information
> from the generated PNG file.

That is wrong: As I have pointed out many times, one can also match 
POV-Ray-generated pixel colors with something else by choosing suitable 
/input/ values for POV-Ray, and this is in fact the correct way to do it.

And I have also mentioned many times that POV-Ray is /not/ performing 
any "correction" on PNG files created with File_Gamma=1.0, but that it's 
the display software which (correctly) does this. As a matter of fact, 
POV-Ray-generated PNG files with File_Gamma=1.0 are the "most linear" 
files you could ever get:

- The brightness values are encoded linearly in the file.
- The gAMA chunk contains the value 1.0, telling any reading software 
"don't perform any gamma-correction on this file unless you need to".

Which is exactly what viewing software will do, because it needs to. 
Because the hardware has an inherent gamma of roundabout 2.2 which needs 
  to be compensated for.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.