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

Re: [pygame] Possible problem in transform




On Monday, January 21, 2002, at 07:58 PM, Pete Shinners wrote:

> 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?)
>

I think the rotozoom/scale/rotate ops should have at least an option for 
some good filtering.. imho they're pretty damn ugly by today's 
standards, makes me feel like I'm using a SNES or something.  I believe 
it's mostly bi(sometimes tri)linear filtering nowadays, often done in 
hardware by 3D chipsets, but should be able to be done fast enough in 
software if written properly.  They didn't really look antialiased to 
me, I could be wrong, I haven't used them in a while because I didn't 
find the results to be satisfactory for much..

-bob

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