471,356 Members | 1,660 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,356 software developers and data experts.

Rotating a picture

Hi,

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 ?

Jun 19 '07 #1
1 1172
In <11**********************@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
Jun 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sandy Bremmer | last post: by
31 posts views Thread by Royal Denning | last post: by
2 posts views Thread by mikeoley | last post: by
2 posts views Thread by Birch | last post: by
4 posts views Thread by Andre Nogueira | last post: by
reply views Thread by adi sesha | last post: by
6 posts views Thread by Lars Netzel | last post: by
3 posts views Thread by avalence | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.