一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

腳本之家,腳本語(yǔ)言編程技術(shù)及教程分享平臺(tái)!
分類導(dǎo)航

Python|VBS|Ruby|Lua|perl|VBA|Golang|PowerShell|Erlang|autoit|Dos|bat|

服務(wù)器之家 - 腳本之家 - Python - python簡(jiǎn)單實(shí)現(xiàn)旋轉(zhuǎn)圖片的方法

python簡(jiǎn)單實(shí)現(xiàn)旋轉(zhuǎn)圖片的方法

2020-07-09 08:51皮蛋 Python

這篇文章主要介紹了python簡(jiǎn)單實(shí)現(xiàn)旋轉(zhuǎn)圖片的方法,涉及Python中image模塊使用技巧,需要的朋友可以參考下

本文實(shí)例講述了python簡(jiǎn)單實(shí)現(xiàn)旋轉(zhuǎn)圖片的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# rotate an image counter-clockwise using the PIL image library
# free from: http://www.pythonware.com/products/pil/index.htm
# make sure to install PIL after your regular python package is installed
import Image
# open an image file (.bmp,.jpg,.png,.gif)
# change image filename to something you have in the working folder
im1 = Image.open("Donald.gif")
# rotate 60 degrees counter-clockwise
im2 = im1.rotate(60)
# brings up the modified image in a viewer, simply saves the image as
# a bitmap to a temporary file and calls viewer associated with .bmp
# make certain you have an image viewer associated with this file type
im2.show()
# save the rotated image as d.gif to the working folder
# you can save in several different image formats, try d.jpg or d.png
# PIL is pretty powerful stuff and figures it out from the extension
im2.save("d.gif")

希望本文所述對(duì)大家的Python程序設(shè)計(jì)有所幫助。

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 成人影音先锋 | 国产ab | 无限韩国视频免费播放 | 三级视频中文字幕 | 99精品视频在线观看 | 久久re视频精品538在线 | 99国产精品免费视频 | 牛牛影院成人免费网页 | 国产免费资源 | 成人免费高清视频 | 91会员 | 日本哺乳期网站xxxx | 国产亚洲综合成人91精品 | 青草影院在线观看 | 青青草原手机在线视频 | 欧美日韩一区不卡 | 公园吃女人奶野战视频 | 国产福利视频一区二区微拍 | 99视频免费| 欧美日韩精品一区二区三区视频 | 青草热视频 | 日韩一区二区三区四区五区 | 亚洲天堂精品视频 | 性xxx免费视频 | 四虎影视在线观看2413 | 俄罗斯一级在线播放 | 国产馆在线观看免费的 | chinese野外gay军人 | 色欧美亚洲 | 欧美日韩国产超高清免费看片 | 性派对videos18party| av魔镜收集号 | 日本一区二区三区在线 观看网站 | 高清国产精品久久 | 国产精品久久久久久久福利院 | 44444色视频在线观看 | 成人国产网站v片免费观看 成人国产精品视频 | 18日本人 | 亚洲一二三区视频 | 亚洲网色 | 免费精品一区二区三区在线观看 |