简体   繁体   中英

PIL image.rotate with transparency

Is there any way to rotate RGBA image, that the result will be smoother. 在此处输入图片说明

I mean, the bottom stop sign is the original image, the top is rotate by (PIL):

img.rotate(angle)

Is there other build in function for it?

在此处输入图片说明

top left:

img.rotate(angle, resample=Image.BILINEAR, expand=True)

top right:

img.rotate(angle, resample=Image.BICUBIC, expand=True)

bottom original.

based on @Dinesh comment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM