imageproc icon indicating copy to clipboard operation
imageproc copied to clipboard

Feature: map_linear_colors

Open carrascomj opened this issue 5 years ago • 0 comments

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:

  1. Remove gamma correction: Rgb<u8> [0,255] -> linear Rgb<f32> [0,1].
  2. Apply user function: f(linear RGB) -> linear RGB.
  3. 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.

carrascomj avatar Nov 09 '20 15:11 carrascomj