ron_osborn
New Member
- Messages
- 3
- Likes
- 0
I've just joined and have started using VB for scripting photoshop CS2. I find its guide somewhat lacking and at times wrong. Is there better documentation anywhere without using the object browser?
At the momemt, I also have a need to use levels in my automation and am trying to figure out how photoshop computes gamma from its midtone slider in the levels dialog. I've assumed that gamma relates the output level (y) to the input level (x) in a power function, or y= x^(1/gamma). Assumming that you adjust the black (b) and white (w) points and scale to this new level range (w-b) then I get the following:
gamma = log((x-b)/(w-b)) / log(.5)
That seems to be pretty close to what photoshop does but thought I'd check whether I am missing something?
At the momemt, I also have a need to use levels in my automation and am trying to figure out how photoshop computes gamma from its midtone slider in the levels dialog. I've assumed that gamma relates the output level (y) to the input level (x) in a power function, or y= x^(1/gamma). Assumming that you adjust the black (b) and white (w) points and scale to this new level range (w-b) then I get the following:
gamma = log((x-b)/(w-b)) / log(.5)
That seems to be pretty close to what photoshop does but thought I'd check whether I am missing something?