473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1217
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John | last post by:
I am rotating images at one location of my web site. My problem is if I set the width and height of the new image before I show the new image, the old image is stretched first to the new image...
1
by: Sandy Bremmer | last post by:
I have seen many Javascripts that rotate images with each load or refresh of the page but so far all I've found require hard coding the image filename into the script. Does anyone know of a script...
31
by: Royal Denning | last post by:
I am designing a table with 2 columns and 20 rows. I want to insert small images (each with a link) and a text title in each cell of the table. On refresh of the page, I would like to have the...
2
by: mikeoley | last post by:
Ok what I'm trying to do should be fairly simple. I have an image on a page that rotates with 4 other images. All I want to do is be able to link this images to different parts of the site...
2
by: Birch | last post by:
Hi, Is there a way to rotate a picture box? I haven't found any in MSDN library. I'm trying to make a simple game in which the user would be able to rotate a space ship. The only way I could...
4
by: Andre Nogueira | last post by:
Hi there. I have one question... How can I create a bitmap (programmatically), paint it to a picture box and have a transparent background? I don't know what will be below the picturebox because...
0
by: adi sesha | last post by:
Hi i am able to rotate the picture in the picture box to the specific angle in vb.net but i want to rotate the picture CONTROL to the specified angle.Thanks in advance sesha ...
6
by: Lars Netzel | last post by:
How do I do this. I want to click on an image, hold the mousebutton down.. and then move the mouse left or right to rotate the picture.. when I release the button the picture stays rotated. ...
3
by: avalence | last post by:
Hello, I am trying to create a nice rotating earth globe (on mouse) on my web site, in order to display my professional relationships all over the world. The best way seems to be a javascript. In...
1
by: AR123 | last post by:
Hi I want to set up a rotating banner. Not sure how to incorporate my rotating banner code into the code below. I want the rotating banner to be the main feature image? This is set up in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.