[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] BUG? rotozoom borders...



Hi

I have been using rotozoom lately and have noticed that it has some strange behaviors:

- if an image is rotate by a multiple of 90 degrees, then the resulting image is bigger (about 2 pixels each) - if an image is rotate by a multiple of 90 degrees, then it will have a black border on two touching sides - if an image is rotated by an arbitrary angle, then the resulting padding is filled with black, normally you don't want to see the padding so I tried using colorkey on it, but that might go wrong, because if the image itself has black in it, then those parts would get 'transparent' as well, which is not desired. Also when using the get_at((0, 0)) pixel for colorkey does not work because rotating it to 360 degrees would make the entire image 'transparent' if it is filled with same color.

See attached sample code for a demonstration of above observations.

Any suggestions for workarounds or avoid those behaviors are welcome.

~DR0ID

Attachment: bug_rotozoom.py
Description: application/python