Python 图形图像处理
基本使用
# Python 3.7.1
# 不做插值,将原图放大2倍
from PIL import Image
im = Image.open("in.bmp")
(width,height) = (im.width*2,im.height*2)
im_resized = im.resize((width,height),Image.NEAREST)
im_resized.save("ret.bmp")
参考链接
用python生成bmp图片:介绍 bmp 的基本图片格式
pillow官方文档