[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Blitting image with alpha channel on a transparent background
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Blitting image with alpha channel on a transparent background
- From: stas zytkiewicz <stas.zytkiewicz@xxxxxxxxx>
- Date: Thu, 22 Apr 2010 16:59:02 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 22 Apr 2010 10:59:15 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:date:received :message-id:subject:from:to:content-type; bh=+eLfDGyoRrq5kodnWj2s77aKIajKdg8Ui3himdscZGA=; b=tcD42mks7+zPPUbwBqEQeLP3qrs9+a2GGbpOqxqAHQBI65piGIwcvNdn4f9/LujwHw W0GtvB5VGyKCtfbrH8gbK+8W+CXpyLNnVE2gyC9Bur9/8iUFDcWfa4uZl92E/SxcTNCt D6ytNbjVVKOBbwQAmoJTpNvifpkJZThugL5/M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; b=wo89+K998n++TUOPnBro3/qDuh3c3/4c5FJcVa8TTIrCXQSTO4yTgKG4jV3dJcJNvr 7RJXbvxfE321ZWj4OGCMYlSk37vd9nzZxOoteZ4mry5L8AwR/mMjjbO8vOyqH+tbbeik n+sDfG/UQiWBT19KO5QGaR0GyI2xxo/Xj5t/o=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello, I hope that someone can point me in the right direction.
I have a semi transparent background surface created with set_alpha(100).
On this surface I want to blit an png image which has a alpha channel.
The problem is that when I blit the png image surface to the background
surface the png image surface is also set to the same alpha value as the
background, 100 in this example.
As a result the complete image is semi transparent.
Thanks,
Stas
--
Free-source educational programs for schools
http://www.schoolsplay.org and http://wiki.laptop.org/go/Schoolsplay
http://gvr.sf.net and http://wiki.laptop.org/go/Guido_van_Robot