Re: How to improve rotation quality?

"Laura & Edward Cannon" <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Try using Image.ANTIALIAS, I find it has the best quality.

On Wed, Feb 17, 2010 at 3:30 AM, Alec Bennett <[email protected]> wrote:
> I'm wondering if anyone has any idea how to get better results from PIL's
> rotate() function? No matter what filter I use I'm getting very jagged edges
> after rotating an image.
>
> Here's how I'm invoking the filters:
>
> pic = pic.rotate(random_rotation, resample=Image.NEAREST, expand=1)
> pic = pic.rotate(random_rotation, resample=Image.BILINEAR, expand=1)
> pic = pic.rotate(random_rotation, resample=Image.BICUBIC, expand=1)    # the
> best I think
>
> I posted a sample app that opens an image and rotates it using each of the
> filters. You can see the jagged edges pretty plainly.
>
> I have a slideshow app that I'm working on where these edges are very
> obvious, so I'm wondering if anyone might have any tips on getting better
> results from rotate(), or from some other method or module that might do a
> better job?
>
> My very simple sample app that tests each of the filters is here:
>
> http://sinkingsensation.com/stuff/rotation_test.zip
>
>
>
> _______________________________________________
> Image-SIG maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/image-sig
>
>
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.