I don't know how to fix your problem, but it seems to me that using an alpha channel instead of a colorkey would be one solution. It might be easier than blitting the surface twice, anyway.
On Fri, Jun 14, 2013 at 6:09 AM, Aikiman <j...@diadem.co.nz> wrote: > Well Im close but still no cigar on this issue and its been there from > around > half way through developing my game. Im trying to achieve a rotating image > that scales at the same time with a colorkey. Problem is I can get colorkey > to work. Heres the code... > > self.imagePuff = pygame.image.load("Images/puff.tga").convert() > self.imagePuff.set_colorkey((0,0,255)) > self.imageMaster = self.imagePuff > self.rect = self.imageMaster.get_rect() > self.image = pygame.transform.rotozoom(self.imageMaster, self.angle, > self.scale/300+0.2) > self.image.set_colorkey((0,0,0)) > self.rect = self.image.get_rect() > self.rect.center = oldCenter > > After the rotozoom I end up with the original colorkey failing > "colorkey((0,0,255))" AND with an extra black box around the animation. So > I > added the second colorkey "colorkey((0,0,0)) " which succeeds in ridding > the > black box but with the blue background color persisting. Is there a > workaround I havent tried yet like bringing the image in with transparency > already - if so how to do? Or do I have to structure my code differently to > compensate for the double transform like blitting onto a second temp > surface > or something fancy like that? > > Thanks in advance > > > > -- > View this message in context: > http://pygame-users.25799.x6.nabble.com/Using-pygame-transform-rotozoom-tp744.html > Sent from the pygame-users mailing list archive at Nabble.com. >