Closed LogWell closed 2 years ago
The reason that tev prints a different color from the python code is that you're mapping linear colors to bytes and then storing them in a format (.png) that usually stores sRGB colors.
Whenever tev loads a low-dynamic-range image, such as a .png, the colors are transformed to linear space as described in https://github.com/Tom94/tev/issues/149 . This explains how 0.4980
turns into 0.2122
.
Whether this is visually misleading is arguable -- it's the standard way to deal with LDR images that have unknown color profiles, but color spaces in general can be a huge mess. I prefer working with raw image formats like .exr
for precisely this reason. :)
As for your question about numerical errors: I believe the only significant source of numerical error is the quantization to bytes.
One big caveat that I need to mention here: .png
allows embedding color profiles, which could in principle work around this issue.
However, the library tev uses to load .png
files (STBI) does not support reading of such information. So the best tev can do is guess sRGB. See https://github.com/Tom94/tev/issues/103 for more info
Relate to 149
I think gamma correction is misleading visually and has numerical errors. Right?
check in![Kazam_screenshot_00001](https://user-images.githubusercontent.com/34391447/145999889-a0bf8ecc-bf0a-49d1-82db-e602040d6bc8.png)
tev
check in![image](https://user-images.githubusercontent.com/34391447/146000068-94bdbef6-2191-4aa5-a447-f234dbb3e578.png)
DaVinci Resolve