Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Golden Bunny

Making images transparent in a SDL program

This topic is 5980 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

Do you mean like ColorKeying, or alphablending.

if colorkeying do this:

SDL_SetColorKey(yourimage, SDL_SRCCOLORKEY, SDL_MapRGB(yourimage->format, 0, 0, 0));

--If you look to the clouds you cant see traps--

[edited by - Direct Dude on June 3, 2002 11:59:26 AM]

Share this post

Link to post
Share on other sites
I've had experience with color keyeing (but not alpha blending) so let me warn you that SDL does not like anything with a 0 in it as a transparency color. Choose some arcane combo like 123, 65, 247 or something instead. I think it may even be finicky about 255, 255, 255 (white) as well. All I know is that it drove me nuts till someone told me

In fact i prob have the thread bookmarked...

yup - here it is


Drew Sikora
A.K.A. Gaiiden

ICQ #: 70449988
AOLIM: DarkPylat

Blade Edge Software
Staff Member, GDNet
Public Relations, Game Institute

3-time Contributing author, Game Design Methods , Charles River Media (coming April/May 2002)
Online column - Design Corner at Pixelate

Unnoficial IGDA chat! [polaris.starchat.net -> #igda]
NJ IGDA Chapter - NJ developers unite!! [Chapter Home | Chapter Forum]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!