Photoshop help with blending layers

Sxotty

Legend
How can I blend/merge layers in photoshop giving equal weight to each layer regardless of layer order? It is really simple I just want to average the pixel color of the pixel in each layer.

However I cannot figure out how to make it work any ideas? Or terms I should be searching for? It seems likely this functionality would be built into photoshop and I don't really have the skill anymore to write a program to do it, though it should be pretty darn easy to check the RGB value in a BMP file for each pixel location and average them.
 
Is this what you are asking for?:

Blend layers 1&2 together with weight = 0.5.

Blend layer 3 on top of those with weight 1/3
..
Blend layer N on top (of results of blended layers 1 thru N-1) with weight 1/N.
 
Is this what you are asking for?:

Blend layers 1&2 together with weight = 0.5.

Blend layer 3 on top of those with weight 1/3
..
Blend layer N on top (of results of blended layers 1 thru N-1) with weight 1/N.

I was thinking of this being the value of a pixel in the same location in each layer.
Code:
1
0
256
240
200
180
I want the resulting blend to have the result (1+0+256+240+200+180)/6=146
I think what you suggest is the same as long as the blend works how I think.

(1+0)/2=0.5
0.5*2/3+256*1/3=86
86*3/4+240*1/4=124.25
...
gives 146 as well. But is there a way to automate this? I don't want to go through 100 layers by hand doing something like this. Thanks

Basically I could go through and blend in sets of 2 with opacity of bottom at 100% and top at 50% then blend the results of the blends as long as they are divisible by a power of 2. I cant believe there isn't a simple function to just average color through the layers though.
 
Thanks for you help guys, I don't know enough about scripting in photoshop to do it. I wrote a MATLAB program that will work theoretically, but I think it may run out of memory. IT has to open every bitmap as of now then it average the 8bit RGB values and spits out a blend. I would rather just read one pixel at a time out of each image so memory issues would not arise. Maybe I am being overly silly though. It might not be a problem and worked ok in a test of only images, certainly much faster than by hand in photoshop.

edit:
for 6 bmps it takes 2s to run the program about so it seems like it will be pretty fast as long as it doesnt crash.
 
Last edited by a moderator:
Back
Top