Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect gamma correction #2

Open
mitjap opened this issue Nov 12, 2020 · 0 comments
Open

Incorrect gamma correction #2

mitjap opened this issue Nov 12, 2020 · 0 comments

Comments

@mitjap
Copy link

mitjap commented Nov 12, 2020

When loading images you apply gamma expension (correction) with following code:

pow(buf[i + 0] / 255.0f, 1.0f / GAMMA),

But this is actually gamma compression. The correct way for gamma expansion would be

pow(buf[i + 0] / 255.0f, GAMMA),

Same issue is when saving the image, but opposite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant