ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pygame-users
pygame-users
Re: [pygame] Question about .bmp files and transparency
by SB other posts by this author
Sep 9 2003 1:27PM messages near this date
[pygame] Question about .bmp files and transparency | RE: [pygame] Question about .bmp files and transparency
In GIMP, use Filters-> Colors->Color To Alpha.  Choose black as the
color.  Then save it in a format that respects the alpha, like PNG.

-sjbrown

On Tue, 2003-09-09 at 04:44, Erlend Strømsvik wrote:
>  Hi
>  
>  Just started trying out Pygame and my first project is coming along
>  nicely: A Tank Wars game. (Got to start somewhere ;)
>  
>  To be able to create some nice explosions I thought I would use some
>  images and 'throw' them around. For the images I already have some .bmp
>  files which I took from another game. 
>  Here is the problem though. These .bmp files are all with a black
>  background, and all have their edges etc. antialiased against black. The
>  game where the images are used the images black background turns fully
>  transparent, then less dark pixels get some transparency and only bright
>  pixels are none transparent.
>  How this is done has me a bit puzzled. The .bmp images are 24 bit no
>  alpha channel.
>  
>  Could I just add together the RGB layers and create an alpha channel
>  from those? Is that viable solution? Or how would -you- do it? :)
>  I could always just use some transparent .gifs but the effects wouldn't
>  be so nice then, with transparency only being limited to one color.
>  
>  I'm also a bit unsure about how to use images with alpha channel or how
>  to add an alpha channel to a image.
>  
>  >From searching the in Internet I guess the term for this is 'alpha
>  blending'? :)
>  
>  
>  Anyway, I really like pygame. I've been using BlitzBasic earlier, but
>  with pygame you much of the same functionality but with a much better
>  programming language.
>  
>  Also, I see now need for future support for older versions of python.
>  
>  
>  
>  -
>  Erlend Stromsvik
-- 
+-------------------------------------------------------------+
| Shandy Brown                               Digital Thinkery |
| shandy@[...].net             http://www.digitalthinkery.com |
+-------------------------------------------------------------+
Thread:
Pete Shinners
Ricardo Quesada
caffeine@tuxfamily.org
=?ISO-8859-1?Q?Nicol=E1s_Ech=E1niz?=
=?iso-8859-1?Q?Erlend_Str=F8msvik?=
SB
=?iso-8859-1?Q?Erlend_Str=F8msvik?=
Pete Shinners
=?iso-8859-1?Q?Erlend_Str=F8msvik?=
Pete Shinners
R. Alan Monroe
Fredrik Johansson
bob@threeoh.com
Pete Shinners
bob@threeoh.com
Caffeine@Tuxfamily.Org

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved