Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the math behind exposure adjustment on photoshop?

I have spent a lot of time on google but couldn't find something useful. I want to set an image's exposure value like photoshop does. So i want to know how to change a bitmap's exposure like photoshop exposure adjustment does?

like image 645
dirhem Avatar asked Aug 28 '12 19:08

dirhem


1 Answers

Theorically for exposure modification x (x being a signed floating point value, 0.0 for non compensation), you have to multiply each pixel luminance value (or each sub-pixel in RVB) by 2 ^ x.

newValue = oldValue * (2 ^ exposureCompensation);

Think about your range of value, to limit value that could be superior to your maximum allowed value (255 in 8bit, 65535 in 16bit). This is what created "burned" part of a picture when you raise the exposure, and this is a part that changed on the new Photoshop process (dubbed '2012)

like image 167
Parallelis Avatar answered Nov 08 '22 05:11

Parallelis