Views
290
Replies
1
Status
Closed
Here’s the scenario.
I have two bitmaps. One is the background bitmap, and the other is the same bitmap but with an alpha-blended sprite pasted on it. For my purpose, the alpha-blended sprite is grayscale.
So if
S is the grayscale value of a pixel of the sprite (not known yet), D_r, D_g, D_b are the RGB values of the same pixel of the empty background, and
B_r, B_g, B_b are the RGB values of the finally blended pixel (known beforehand), then
alpha = 1 – (B_r – B_b)/(D_r – D_b)
so that
S = (B_r*(D_r – D_b) – D_r*(B_r – B_b))/(B_r + D_r – B_b – D_b).
So I need an image program that will allow me to do these functional manipulations on the RGB pixel values of separate bitmaps, all at once.
Does Photoshop do it?
I have two bitmaps. One is the background bitmap, and the other is the same bitmap but with an alpha-blended sprite pasted on it. For my purpose, the alpha-blended sprite is grayscale.
So if
S is the grayscale value of a pixel of the sprite (not known yet), D_r, D_g, D_b are the RGB values of the same pixel of the empty background, and
B_r, B_g, B_b are the RGB values of the finally blended pixel (known beforehand), then
alpha = 1 – (B_r – B_b)/(D_r – D_b)
so that
S = (B_r*(D_r – D_b) – D_r*(B_r – B_b))/(B_r + D_r – B_b – D_b).
So I need an image program that will allow me to do these functional manipulations on the RGB pixel values of separate bitmaps, all at once.
Does Photoshop do it?
Master Retouching Hair
Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.