python旋转图片的代码详解编程语言
2023-06-13 09:20:24 时间
# 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")
8293.html
cjavapython相关文章
- 在pycharm中如何新建Python文件?_github下载的python源码项目怎么用
- python chmod_Python os.chmod用法及代码示例
- python绘制条形柱状图_Python柱状图
- 1行Python代码,把PPT转成图片,python-office功能更新~
- Python 按行读取文本文件 缓存 和 非缓存实现详解编程语言
- Python多线程结合队列下载百度音乐代码详解编程语言
- python计算N天之后的日期详解编程语言
- python获取Windows特殊文件夹路径代码详解编程语言
- python xmlrpc实现文件传输的代码详解编程语言
- Python获取系统信息的代码详解编程语言
- Python文件、目录的一些操作(新增、移动、删除)详解编程语言
- 获取中国省市的Python代码详解编程语言
- Python 实现一个小功能: 删除某路径下文件及文件夹的脚本详解编程语言
- python编写的一个通过多线程扫描端口的代码详解编程语言
- python获取文件夹大小的代码详解编程语言
- Python常用内建模块——学习笔记详解编程语言
- Python学习笔记之三lambda表达式用法小结详解编程语言
- Python爬虫笔记(一):爬虫基本入门详解编程语言
- 小白的Python之路 day5 python模块详解及import本质编程语言
- python_day18-19_面向对象编程1详解编程语言
- python_day01-作业详解编程语言
- Python3.x:python: extend (扩展) 与 append (追加) 的区别详解编程语言
- mac多版本python安装 pymysql详解编程语言
- Linux下Python编程:从入门到精通(linux下python编程)