• Advertisement
Sign in to follow this  

sprites without black color around them

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

Say I have a planet that I made in a paint program such as gimp or photoshop. How can I make the bitmap only have the planet so that there is no black color around it.

Share this post


Link to post
Share on other sites
Advertisement
color keying.

Alternatively, you could make the bitmap with an originally transparent background (requires an alpha channel, and means you'll probably save as a PNG)

Share this post


Link to post
Share on other sites
what programing language and what graphics system are you using

Share this post


Link to post
Share on other sites
Quote:
Original post by subflood
Say I have a planet that I made in a paint program such as gimp or photoshop. How can I make the bitmap only have the planet so that there is no black color around it.


Ok. 'I have a planet that I made in a paint program such as gimp or photoshop.'
Did I do it right?


Ok. Ill be serious. A quick search on google brought this page. In the second post, he says that anything hot pink (rgb(255,0,255)) is transparent when using the draw_sprite function. Ive never used allegro, but this makes sense to me.

Hope that helps =)

Share this post


Link to post
Share on other sites
"Ok. Ill be serious. A quick search on google brought this page. In the second post, he says that anything hot pink (rgb(255,0,255)) is transparent when using the draw_sprite function. Ive never used allegro, but this makes sense to me.

Hope that helps =)"

Yes I tried that already but thats not what I want. What C-Junkie said about making the background transperent requiring an alpha channel is what I want.

The problem I'm having now is I'm not sure how to work with alpha channels in allegro. If I try to draw the PNG sprite the program just crashes.

Share this post


Link to post
Share on other sites
Ok then... maybe this is more along the lines of what you want? If not, I would just recommend looking around that site a bit.

Oh well... I hope I got closer this time =/


Edit:
Maybe I should just leave and let someone that knows something about allegro help you, haha =)

[Edited by - Lord Hen on December 5, 2004 8:53:10 PM]

Share this post


Link to post
Share on other sites
I fixed my problem, I was calling load_bmp() to open a PNG picture but what I needed to call was load_bitmap()

Now I have a new problem. If I call set_alpha_blender() and than draw_trans_sprite() all I get is a black rectangle.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement