Python论坛 - 国内最好的Python中文社区
标题:
一分钟入门Pillow
[打印本页]
作者:
我是吃货
时间:
2019-7-20 17:02
标题:
一分钟入门Pillow
Pillow即为Python的图像库,下载请打开命令行(运行输cmd)输:
pip install pillow
复制代码
创建一个256*256的黑色图像:
from PIL import image
im = Image.new('RGB', (256, 256))
im.show
复制代码
代码中两个256的值可以替换,这样会改变图像大小。
打开指定图像方法:
def open(fp, mode = 'r'):
pass
复制代码
欢迎光临 Python论坛 - 国内最好的Python中文社区 (https://bbs.pythontab.com/)
Powered by Discuz! X3.4