Algorithm to modify brightness for RGB image?

后端 未结 6 1128
深忆病人
深忆病人 2020-12-10 05:33

I know there is formula for going RGB -> Luminance, but I need given a brightness parameter to modify the RGB values of an image. How do I do that?

Thanks

6条回答
  •  再見小時候
    2020-12-10 06:18

    Map from RGB to HSL (Hue/saturation/luminance), keep the hue and saturation the same, and just modify the luminance and then do the backward mapping from HSL to RGB.

    You can read more about the RGB to HSL and HSL to RGB transformations here.

提交回复
热议问题