473,226 Members | 1,579 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,226 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 1210
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.