[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] .png saving



Ian Mallett wrote:
On 10/27/07, Ian Mallett <geometrian@xxxxxxxxx> wrote:
It crashes with something like:
"The application has asked to be terminated in an unusual way.  Please
contact the applications support team for more info."
Doing anything to the surface kills the program.  The way I take
screenshots is with alt+printscreen.  That's not ideal, so a
screenshot function would be most welcome.

A screenshot function? Why not:

## Where "screen" is your display surface:
screenshot = pygame.surface.Surface(screen.get_size())
pygame.image.save(screenshot,"screenshot.bmp")