Perfect ­ thanks so much yet again!
John

From:  Lenard Lindstrom <le...@telus.net>
Reply-To:  <pygame-users@seul.org>
Date:  Mon, 24 Oct 2011 19:26:02 -0600 (MDT)
To:  <pygame-users@seul.org>
Subject:  Re: [pygame] Fast method for pixellated animation

Hi,
 
The Pygame scroll.py example program uses the pygame.transform.scale
function to zoom in on an image.
 
https://bitbucket.org/pygame/pygame/src/dd6752f761be/examples/scroll.py
 
It is packaged with Pygame and can be run with the following command line:
 
python -m pygame.examples.scroll
 
 
Lenard Lindstrom
 
On Oct 24, 2011, John Jameson <jwin...@gmail.com> wrote:
> Thanks ­ I tried this but I'm just learning pygame and just need to get a
> little higher on the curve I guess.
> I'll get it though. Thanks so much again.
> john
> 
> 
> From:  Christopher Night <cosmologi...@gmail.com>
> Reply-To:  <pygame-users@seul.org>
> Date:  Mon, 24 Oct 2011 18:22:00 -0400
> To:  <pygame-users@seul.org>
> Subject:  Re: [pygame] Fast method for pixellated animation
> 
> The obvious solution is pygame.transform.scale. Whether this is the most
> efficient method or not depends on how you're generating the image in the
> first place. But if you've already got a 100x100 image as a pygame.Surface
> object, and you want to create a 400x400 image out of it, it's clearly the way
> to go.
> 
> -Christopher
> 
> On Mon, Oct 24, 2011 at 5:59 PM, John Jameson <jwin...@gmail.com> wrote:
>> 
>>  Hi,
>>  I would like an efficient way to generate an animated grey-scale
>>  "pixellated" image. For example, to be able to generate an image say of
>> 100 X 100 pixels, where I can specify the size of the image on the screen
>>  (which thus determines the size of the pixels). One way would be to treat
>>  each pixel as a filled rectangle and draw them accordingly, but this could
>>  be quite slow since it has to do this 10,000 times for each image. Another
>>  way might be to just generate the image as a 100X100 image but "magnified"
>>  and thus automatically obtaining the same result. Is this possible? If
>>  not, is there yet another way to do this that might be more efficient?
>>  thanks,
>> john 
> 


Reply via email to