做了一个GUI。
首先是有上传图片的按钮,上传图片后,再点击旋转按钮,旋转此图片。此时旋转怎样实现?
用PIL(pip install Pillow)
如图,我把 python.png 反转了
main.py :
from PIL import Image
python = Image.open('python.png')
nohtyp = python.transpose(Image.FLIP_LEFT_RIGHT)
nohtyp.save('nohtyp.png')
旋转后再保存,在加载就好了
还可以这样:https://blog.csdn.net/guduruyu/article/details/70842142