Rotating a picture
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Tue Jun 19 04:03:11 EDT 2007
In <1182238895.646197.270090 at k79g2000hse.googlegroups.com>, Tom Gur wrote:
> I'm trying to build a small spaceship battle game as an exercise,
> using pygame.
> How can I rotate the gif file of my ship by X degrees ?
You shouldn't do this with the PyGame functions, the quality is poor.
Either use a paint program to pre-generate rotated images or the python
imaging library (PIL) to create them in the game.
Either way you should use an RGB format instead of a format with a
palette to have better anti aliasing, and always rotate from the original
image as each rotation introduces some loss of quality and detail.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list