Ah, of course! I was so fixated on adjusting alpha, I completely ignored blending effects. I can't properly test how good it looks yet, but it causes very little if any slowdown (seems to be none). Thanks for the help! :)
________________________________ From: Weeble <[email protected]> To: [email protected] Cc: Julian Marchant <[email protected]> Sent: Wed, April 13, 2011 1:37:35 AM Subject: Re: [pygame] Whoa! Bad slowdown! On Wed, Apr 13, 2011 at 1:49 AM, Julian Marchant <[email protected]> wrote: > Is there a better way to do what I'm trying to do in that section of code? Try something like this: img = self.images[self.leftarm_image][img_index].copy() img.fill((255,255,255,255*alpha_percent), special_flags=BLEND_RGBA_MULT) > ________________________________ > From: Ian Mallett <[email protected]> > To: [email protected] > Sent: Tue, April 12, 2011 7:53:24 PM > Subject: Re: [pygame] Whoa! Bad slowdown! > > Well, for one thing, on my machine, it segfaults constantly. > > I tracked it down to ~line 1006: > scaled = pygame.transform.smoothscale(img, size) > But there doesn't seem to be anything out of the ordinary there. Maybe > trying to resize many 1x1 surfaces to 400x400 leads to a memory leak > somewhere in PyGame? > > Ian >
