Ian this is an extremely helpful answer. It will save me much pain. I have sent you a personal email thanks as well. From: owner-pygame-users@xxxxxxxx [mailto:owner-pygame-users@xxxxxxxx] On Behalf Of Ian Mallett On Wed, Feb 29, 2012 at 12:23 PM, Lin Parkh wrote:
As far as I am aware, and the way you're asking, no. If you think about it, the destination surface is has binary transparency values (i.e., completely opaque or completely transparent). What sort of data would you expect to store to get a semi-transparent colorkeyed surface? My recommendation is to just use per-pixel alpha for just about everything. You can pretty easily convert a colorkeyed surface into one. At a guess, I would appreciate if the designers made .convert_alpha() do this--but if they didn't, the conversion would be pretty simple: loop through all pixels in the old surface, set the new surface's corresponding pixel's transparency to be either 0 or 255 based on what the RGB color is. If you do this, then the blending operation you described above suddenly becomes trivial. Ian |