I made an example image in photoshop. One layer is blue with 70% opacity. Above that, is a red layer also with 70% opacity. I loaded the image into DB and extracted the alpha value for the pixel, which was 232 or 0.9
Following Inflictive's equation, the result would've been 1.19 instead of 0.9
layer1 = ARGB(179,0,0,255)
layer2 = ARGB(179,255,0,0)
result = ARGB(232,197,0,58)
Maybe alpha blending wasn't the right thing I wanted, but
alpha compositing. Following those equations, I got the following results (where layer 2 is above layer 1):
ARGB(232.05, 178.5, 0, 53.5)
It's close, but not sure why the numbers are slightly off on the color channels. Either I'm missing a step or Photoshop does something slightly different (which is entirely possible).
Where 0.7 = 179/255
red = 255*0.7 + 0*0.7*(1-0.7) = 178.5
blue = 0*0.7 + 255*0.7(1-0.7) = 53.55
alpha = 0.7 + 0.7*(1-0.7) = 0.91 (or 255*0.91 = 232)
Well I've got the code implemented into my program and as far as I can tell, it's blending the two transparency layers properly. So I guess problem solved, but thanks for trying to help out.