math foundation

952 views3 repliesLast post: 1/2/2008
Where can I find explanations of the various photoshop operations in terms of RGB math/operation?

E.g. increasing brightness is easy:
R=R+<brightness>
G=G+<brightness>
B=B+<brightness>

increasing contrast is
R=(R-127) x <contrast> + 127
ditto for G, B

Some operations involve two sets of RGB (from two different layers). E.g. I would like to see how the various blending mode is done. Again, some are more obvious than others. E.g. lighter:
R = max (R1, R2) where R is the blended result, R1 and R2 are from two different layers

There are several blending modes that I don't understand and would be nice to know.

I suppose I could download the source code for GIMP and read it. But I'm hoping there is an easier way. A book would be nice. A web-based article is also good.
#1
On Jan 1, 3:14 am, "peter" wrote:
Where can I find explanations of the various photoshop operations in terms of RGB math/operation?

E.g. increasing brightness is easy:
R=R+<brightness>
G=G+<brightness>
B=B+<brightness>

increasing contrast is
R=(R-127) x <contrast> + 127
ditto for G, B

Some operations involve two sets of RGB (from two different layers). E.g. I would like to see how the various blending mode is done. Again, some are more obvious than others. E.g. lighter:
R = max (R1, R2) where R is the blended result, R1 and R2 are from two different layers

There are several blending modes that I don't understand and would be nice to know.

I suppose I could download the source code for GIMP and read it. But I'm hoping there is an easier way. A book would be nice. A web-based article is also good.

I don't think brightness in RGB is that simple. Once you peg a channel an algorithm would have to be selected to determine how to distort the other two.
#2
peter skrev:
Where can I find explanations of the various photoshop operations in terms of RGB math/operation?

Try to ask in comp.graphics.algorithms for image processing book recommendations. Perhaps do a search in the group with google first as I think they got a FAQ.

PS: I do have some computer graphics programming books but none concerning image processing so I can't recommend anything sorry.
#3
"peter" wrote in message
Where can I find explanations of the various photoshop operations in terms of RGB math/operation?

E.g. increasing brightness is easy:
R=R+<brightness>
G=G+<brightness>
B=B+<brightness>

increasing contrast is
R=(R-127) x <contrast> + 127
ditto for G, B

Some operations involve two sets of RGB (from two different layers). E.g. I would like to see how the various blending mode is done. Again, some are more obvious than others. E.g. lighter:
R = max (R1, R2) where R is the blended result, R1 and R2 are from two different layers

There are several blending modes that I don't understand and would be nice to know.

I suppose I could download the source code for GIMP and read it. But I'm hoping there is an easier way. A book would be nice. A web-based article is also good.
some info here.
http://www.pegtop.net/delphi/articles/blendmodes/
#4