If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
![]() |
|
|
#1 |
|
Senior Member
Join Date: Dec 2002
Location: Under a Crushing Burden
Posts: 4,297
|
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.
__________________
You bought horse armor didn't you? |
|
|
|
|
|
#2 |
|
Tea maker
Join Date: Feb 2002
Location: In the Island of Sodor, where the steam trains lie
Posts: 4,396
|
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.
__________________
"Your work is both good and original. Unfortunately the part that is good is not original and the part that is original is not good." -(attributed to) Samuel Johnson "I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." Alan Kay |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Dec 2002
Location: Under a Crushing Burden
Posts: 4,297
|
Quote:
Code:
1 0 256 240 200 180 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.
__________________
You bought horse armor didn't you? |
|
|
|
|
|
|
#4 |
|
Tea maker
Join Date: Feb 2002
Location: In the Island of Sodor, where the steam trains lie
Posts: 4,396
|
__________________
"Your work is both good and original. Unfortunately the part that is good is not original and the part that is original is not good." -(attributed to) Samuel Johnson "I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." Alan Kay |
|
|
|
|
|
#5 |
|
Remember
Join Date: Aug 2003
Posts: 2,041
|
Write a script? (Caveat, I haven't looked at the scripting capabilities of Photoshop in ages.)
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Dec 2002
Location: Under a Crushing Burden
Posts: 4,297
|
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.
__________________
You bought horse armor didn't you? Last edited by Sxotty; 17-Nov-2011 at 00:22. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|