How can I mix two ARGB pixels ?
Example
Here A is (Red with Alpha) and B is ( Blue with Alpha ).
How can I mix two ARGB pixels ?
Example
Here A is (Red with Alpha) and B is ( Blue with Alpha ).
It seems like this is what you want: http://en.wikipedia.org/wiki/Alpha%5Fcompositing#Alpha%5Fblending, but I'm a little confused by your notation since wikipedia says that argb values should range from 0.0 to 1.0. So I don't think this formula will give you FA=19. Can you clarify?
Edit: now that you took out the business about FA=19, I'm inclined to go with that formula.
Taken from the same Wikipedia article where you got the image:
Translating to values which range from 0 to 255:
rOut = (rA * aA / 255) + (rB * aB * (255 - aA) / (255*255))
gOut = (gA * aA / 255) + (gB * aB * (255 - aA) / (255*255))
bOut = (bA * aA / 255) + (bB * aB * (255 - aA) / (255*255))
aOut = aA + (aB * (255 - aA) / 255)