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