[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Apply alpha to another image
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Apply alpha to another image
- From: "Stuart Axon" <stu.axon+pygame@xxxxxxxxx>
- Date: Mon, 19 Nov 2007 23:27:47 +0000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 19 Nov 2007 18:27:55 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; bh=alz/AobMlPfhzlqv1gs2UIg59o1OnPx7ICEAOJp4Dzw=; b=INM0S7TwNPYW1iWjCjRCKhiRBIrtJiu0ufEl3PM+3Wn11PuYHizJW9NjB87niBwdA1dMRCzFwbq0w8Q292+R+D/ZMohCUMEvPik67e0M4F5YJR8oLfknwcJbs7+8OPOGEFebaCOcBR6ke2ab+/Qu9meMC65IgiwjKiCXbOitw5M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=p8SMA5UrHxQ3978d3O4RyfYjvit/+0Yg6MAOScckNL/WeWYgT/2xHImzL+JrLe4KQqWq6Mk/tNXWczLWrdzlnNmlxgomkNtJtnixZjr4S+A0bsUjwhltvK7+PpRwT6GuZtKhOv9ZkIgLPEmMiSsz7/tsqWPqgPoK5t4l3g9/gEY=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello,
I'm wondering the best way to apply alpha from one surface onto another -
I can get the alpha with
pygame.surfarray.array_alpha
But can't see a corresponding way to apply that to a surface without
affecting the rgb values.
Basically I have two images, one paletted, I manipulate the palette
then blit it onto a 32 bit surface.
The second image has the alpha, I want to apply this to the surface,
keeping the rgb values - basically a very quick way of colourising
things.