imageproc
imageproc copied to clipboard
Feature: map_linear_colors
This may be a bit too specific but I find it quite common. The idea is to have a function map_linear_colors(), similar to map_colors(), that operates on Images with Rgb/a pixels. For each pixel:
- Remove gamma correction:
Rgb<u8> [0,255] -> linear Rgb<f32> [0,1]. - Apply user function:
f(linear RGB) -> linear RGB. - Apply gamma correction:
linear Rgb<f32> [0,1] -> Rgb<u8> [0,255].
(I think I got the naming right)
If is interesting for the library, I could do a PR for it.