all you've done is mixed colors. do-it-yourself method :
b_Pixel = (Pixel_2 And &HFF) * shade + (Pixel_1 And &HFF) * (1. - shade)
Or _
((Pixel_2 And &HFF00&) * shade + (Pixel_1 And &HFF00&) * (1. - shade))
And &HFF00& Or _
((Pixel_2 And &HFF0000) * (shade) + (Pixel_1 And &HFF0000) * ((1. -
shade))) And &HFF0000
'Pixel_1' and 'Pixel_2' are the pixel colors of the two source images at
the same destination x,y
'shade' is a blending factor (0.0 - 1.0)
image_2 is superimposed on image_1, the 'shade' factor controls the
translucency of image_2.
shade=0.0 -> 100% translucency (destination image = image_1)
pete
Quote:
> I have found two API to Alpha blend pictures together: the AlphaBlend API
> and the GdiAlphaBlend. The problem is that my two pictures are bitmaps of
> irregular shapes with a black background. When the red part of one shape
> blends with the black background from the other picture I get dark red when
> there should just be red. This is because it thinks the black part is part
> of the shape when it actually should be transparent. Take a look at this
> screen shot to see what I mean:
> http://homepage.ntlworld.com/alex.spurling/Screenshot.gif
> Are there anyways to get around this? Or other ways to alpha bland images?
> Thanks,
> Alex