Slick Forums

Discuss the Slick 2D Library
It is currently Sat May 25, 2013 4:55 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu May 17, 2012 3:18 am 
Offline

Joined: Sun May 13, 2012 11:03 am
Posts: 5
Hello forum,

I'm gonna ask probably a trivial question.
I can't find it, or din't read the API very well.
I would like to draw my sprites without the magenta background, or if needed another color selected.
What are the procedures required for this?

Thanks


Top
 Profile  
 
PostPosted: Thu May 17, 2012 3:59 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1469
A) Take the background out in Photoshop or GIMP. This is the most efficient solution as it doesn't require copying pixels.
B) Use the Color parameter when constructing an image to specify the image to be turned transparent. Note that this is currently bugged in the dev branch.


Top
 Profile  
 
PostPosted: Thu May 17, 2012 4:26 am 
Offline
Regular

Joined: Tue Aug 23, 2011 8:19 am
Posts: 111
In addition to what davedes said, use the PNG file format, which stores transparency. You may have to add an Alpha layer to your image in Gimp before you can start creating transparent pixels.

_________________
My indie games: http://cmagames.webs.com


Top
 Profile  
 
PostPosted: Tue May 22, 2012 12:46 am 
Offline

Joined: Sun May 13, 2012 11:03 am
Posts: 5
davedes wrote:
A) Take the background out in Photoshop or GIMP. This is the most efficient solution as it doesn't require copying pixels.
B) Use the Color parameter when constructing an image to specify the image to be turned transparent. Note that this is currently bugged in the dev branch.


Thanks, the color parameter method is what I thought about. But, since you suggested the png format I will do so.


Top
 Profile  
 
PostPosted: Tue May 22, 2012 9:42 am 
Offline

Joined: Mon May 07, 2012 11:36 pm
Posts: 93
Just putting it out there, but, paint.net is also a good Image Editor. I use it for all my graphics needs. Something that i like is, if i wanna do semi transparent stuff, i just create a new layer, draw, for example, a shadow in black, change the layers alpha (right click, properties, and drag the bar till it looks right), then merge the layer back down. That keeps the transparency on the image. Works for me :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group