[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Possible problem in transform



Mike Benfield wrote:
> I believe rotate and rotozoom are destructive operations - they're not
> supposed to keep all the information. I just keep the original image on
> hand and then always rotate from that. ie, rather than rotating 45
> degrees once and then rotate the new image 45 degrees again, I rotate 45
> degrees, and then go back and rotate the original image 90 degrees and
> use that. Hopefully that makes sense, and hopefully this is actually
> what your problem is. 

yes, this is the problem with rotate, it is destructive. it's like 
scaling an image down, you can't get the original back. if you do want 
animated rotations, it's best to always keep a copy of the original and 
rotate from that. the "chimp" example shows how to do this when the 
monkey is spinning.

each time you rotate, there will be some amount of 'error'. by rotating 
the same image multiple times, the image will get worse each time.

this is true with any rotating algorithm (afaik). even in photoshop if 
you rotate an image, then rotate it back, the quality won't be the same 
as the original. photoshop rotates are probably higher quality and are 
therefore less-lossy than pygame's rotate. (the rotozoom function is 
antialiased, which should be pretty close?)

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org