• 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使用稀疏矩阵节省内存实例
  • python正则分组的应用
  • 剖析Python的Twisted框架的核心特性
  • Python tempfile模块学习笔记(临时文件)
  • Python使用Scrapy爬取妹子图
  • python基础入门详解(文件输入/输出 内建类型 字典操作使用方法)
  • 简单介绍Python中的几种数据类型
  • python套接字流重定向实例汇总
  • 在Docker上部署Python的Flask框架的教程

文章分类

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

最近更新的内容

    • python比较两个列表大小的方法
    • Python Queue模块详细介绍及实例
    • Pycharm学习教程(4) Python解释器的相关配置
    • 介绍Python的@property装饰器的用法
    • Python中多线程及程序锁浅析
    • Python 26进制计算实现方法
    • Python2.7简单连接与操作MySQL的方法
    • python动态监控日志内容的示例
    • Python之Web框架Django项目搭建全过程
    • 让python同时兼容python2和python3的8个技巧分享

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

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