Sign in to follow this  

Alpha Blending in Allegro?

This topic is 4547 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using Dev-C++ and Allegro, and in my game I have a character that is a 16x16 image, but he always seems to have a black box surrounding him. I would like to know how I can get that box to have an alpha of 0, but just the box not the character.

Share this post


Link to post
Share on other sites
It sounds like you want simple transparency.

If you are in 8-bit color depth, any color with 0 is considered transparent.

If you are in 15,16,24,32 bit color depth, any color of RGB FF00FF is considered transparent.

Using the "draw sprite" or "masked blit" functions with an image as defined above will eliminate your "black box border" problem.

Share this post


Link to post
Share on other sites

This topic is 4547 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this