• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell
您的位置:首页 > 脚本语言 >python > python简单实现旋转图片的方法

python简单实现旋转图片的方法

作者: 字体:[增加 减小] 来源:互联网

通过本文主要向大家介绍了python实现单例的方法,笨方法学 python,笨方法学python pdf,笨方法学python第四版,python 静态方法等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com

本文实例讲述了python简单实现旋转图片的方法。分享给大家供大家参考。具体实现方法如下:

# 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")

</div>

希望本文所述对大家的Python程序设计有所帮助。

</div>

您可能想查找下面的文章:

  • python非递归全排列实现方法
  • python实现读取并显示图片的两种方法
  • python自动翻译实现方法
  • Python自动扫雷实现方法
  • Python实现模拟登录及表单提交的方法
  • Python自动扫雷实现方法
  • python实现计算倒数的方法
  • python实现计算倒数的方法
  • Python实现批量下载图片的方法
  • python实现自动登录人人网并采集信息的方法

相关文章

  • Python实现批量下载图片的方法
  • Python中使用PIL库实现图片高斯模糊实例
  • python 写入csv乱码问题解决方法
  • Python正则表达式使用范例分享
  • 详解Django框架中用户的登录和退出的实现
  • python正则分组的应用
  • python文件写入实例分析
  • 浅析Python的Django框架中的Memcached
  • python获取当前用户的主目录路径方法(推荐)
  • 在Python的Django框架中用流响应生成CSV文件的教程

文章分类

  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell

最近更新的内容

    • python命令行参数解析OptionParser类用法实例
    • python实现调用其他python脚本的方法
    • Python安装第三方库的3种方法
    • 在win和Linux系统中python命令行运行的不同
    • 在Django的模板中使用认证数据的方法
    • 用Python实现换行符转换的脚本的教程
    • Python SQLite3数据库操作类分享
    • Python简单进程锁代码实例
    • python实现倒计时的示例
    • 在Python中利用Into包整洁地进行数据迁移的教程

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有