Python提到图像处理第一个想到的库就是PIL,全称Python Imaging Library Python,图像处理类库,它提供了大量的图像操作,比如图像缩放,裁剪,贴图,模糊等等。
今天小编就整理几个常用的图片处理例子。
一、照片去色
from PIL import Image
img = Image.open("img.jpg")
img_01 = img.convert("L")
img_01.save("img_L.jpg")
二、照片模糊<
Python提到图像处理第一个想到的库就是PIL,全称Python Imaging Library Python,图像处理类库,它提供了大量的图像操作,比如图像缩放,裁剪,贴图,模糊等等。
今天小编就整理几个常用的图片处理例子。
一、照片去色
from PIL import Image
img = Image.open("img.jpg")
img_01 = img.convert("L")
img_01.save("img_L.jpg")
二、照片模糊<