python改变图片尺寸,,from PIL imp
python改变图片尺寸,,from PIL imp
from PIL import Imagedef change_image_size(image_path,size=(600,600)): img = Image.open(image_path) img = img.resize(size) #img.thumbnail(size,Image.ANTIALIAS) //缩放 img.save('./result.jpg')change_image_size('image.jpg')
相关内容
- python programming exercise facemove,pythonfacemove,from graphic
- 一个Python备份脚本,Python备份脚本,编写一个Python脚本
- 自己实现的2048,自己实现2048,# _*_utf-8_*
- 用Python配置JDK环境,Python配置JDK环境,#!usr\bin\en
- python3下载妹子图,你懂的。,python3妹子图,None
- 打印命令行参数,,#打印命令行参数#!/u
- 基于tornado的web linux远程登录,tornado远程登录,import se
- 根据定义实现基本的回文数检测程序,回文数检测程序
- bitwise operator example,bitwiseoperator,>>> def b(n)
- 网易云音乐 Linux 更新 - 2015-4-20,linux2015-4-20,print u“h
评论关闭