how add a color key with AlphaBlend() API function?

Started by
10 comments, last by cambalinho 7 years, 5 months ago

Test to see if it has an alpha channel.

If it has an alpha channel render using alpha.

If it doesn't have an alpha channel, render with a color key. Alternatively, process the image yourself and add an alpha channel, setting the alpha value based on matching the color key.

If I'm remembering rightly you should be able to tell from the bitmap object's header info if it has transparency, but if somehow you have no way to tell if the image has alpha or color key, you might always apply the color key in addition to whatever alpha values may already be in there.

Advertisement

i'm sorry, but the number of bits it's important?

heres how i create the Bitmap:


ImageBitmap = CreateCompatibleBitmap(GetDC(0), Width, Height)

so. how can i create a bitmap with 32 bit's(seems that the AlphaBlend() can fail if it's less than 32bpps) or more?

can anyone explain to me what is 'bpps'?

This topic is closed to new replies.

Advertisement