使用PIL按比例做缩略图,pil比例缩略图,im = Image.o
使用PIL按比例做缩略图,pil比例缩略图,im = Image.o
im = Image.open('ceshi.jpg')size = im.sizeif size[0] > size[1]: rate = float(120) / float(size[0])else: rate = float(90) / float(size[1])new_size = (int(size[0] * rate), int(size[1] * rate))new = im.resize(new_size, Image.BILINEAR)new.save('new.jpg')#该片段来自于http://byrx.net
相关内容
- 虾米签到,,#!/usr/bin/p
- 很蛋疼的python3快盘签到,python3签到,__author__ =
- 批量下载google图片搜索结果,google图片搜索结果,googl
- Gauss-Legendre integration in Python,,''' I = gaus
- Python 写入CSV,python写入csv,# _*_ coding
- Levenshtein字符串相似度,Levenshtein字符串,概述Levenshtei
- 扫雷,,输入 x/y 选择位置扫
- 使用PIL给图片加水印的工具类 - Python,,#! /usr/bin/
- 多线程爬虫批量下载pcgame图片url,保存为xml,pcgamexml
- 使用gevent多线程下载豆瓣音乐,gevent豆瓣,使用gevent比
评论关闭