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

Clear up the luma vs. luminosity mixup #399

Open
Ogeon opened this issue May 9, 2024 · 1 comment
Open

Clear up the luma vs. luminosity mixup #399

Ogeon opened this issue May 9, 2024 · 1 comment
Labels
definitely breaking Issues that are known before-hand to be a breaking change
Milestone

Comments

@Ogeon
Copy link
Owner

Ogeon commented May 9, 2024

The current Luma type isn't actually representing luma. It's relative luminosity with or without gamma compression, which is fine and what's usually encoded in grayscale images if I understand correctly. The problem is that the terminology is misleading for anyone who actually wants luma.

The difference is that to get the relative luminosity from RGB, the linear values are used. To get the luma, the gamma compressed values are used. It's possible that the coefficients can be different for luma too, but I need to look into that.

What to do? I think the simple solution is to rename Luma. I'm not sure there's a need for an actual luma type, but that one can take the name in that case.

Let me know if you have naming suggestions. I'm thinking about calling it Luminance, but something easier to understand is also an option.

@Ogeon Ogeon added the definitely breaking Issues that are known before-hand to be a breaking change label May 9, 2024
@Ogeon
Copy link
Owner Author

Ogeon commented Jun 20, 2024

"Mono" for monochrome is also an option. More neutral.

@Ogeon Ogeon added this to the 0.8.0 milestone Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
definitely breaking Issues that are known before-hand to be a breaking change
Projects
None yet
Development

No branches or pull requests

1 participant