[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] How do I make a image transparent?
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] How do I make a image transparent?
- From: Luke Paireepinart <rabidpoobear@xxxxxxxxx>
- Date: Tue, 11 Sep 2007 21:44:05 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 11 Sep 2007 22:44:22 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=2fz9OB4vi/zhTodf8YGJT49pQ4656Cn/NFZbxCSnFkA=; b=V3rMjg9CczV/6z+KWzUb4Kizytm9G1HoJzdxKNU4cnlBWoFnIQ++Zmpkf8arCNxlwgnyZSvxYwnfbksAEPJKFIS36Xxuvx0/dNUzRVz12qA9TmVSMwc4Y7iLTnrH/czeHlAg63VEAxObjwrKFGQDCaPG0L11jhYQLTF3VcKlOqE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=A13DqMbwuyWqMaNctK9+TX0kG8APQaYFpL45De7y79ulx05/1gl1iDgawSkhMauihpPEt4tOC0jro1tzIxOCjfuTHkf5TgN4dqnzezxs888CDxWYKzEydatSk0fdAFIZUbIi51dVb0eD5GBocqZeBPjW3udvuEzRGLKlzPWzZ4Q=
- In-reply-to: <eb79828c0709111802v17a7ecag37ffdc11803b4d08@xxxxxxxxxxxxxx>
- References: <eb79828c0709111802v17a7ecag37ffdc11803b4d08@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Thunderbird 2.0.0.6 (Windows/20070728)
Lamonte Harris wrote:
See I got this png file w/ a white BG :( is it possible to make the
white in the BG of the image transparent?
Of course - look into the setcolorkey method of surfaces. You'd just
set the color key to white.
255 blue is more common as a colorkey, since white is much more common
as a color, but it will work just fine in this case since there's no
white in the sprites themselves, just in the backgrounds.