对自己的期望降得很低了,已经适应这样的生活了
今天很开心,把图一转化成了图二
image.png
image.png
代码如下
from matplotlib.pyplot import imread, imsave
from PIL import Image
img = imread(r'C:\Users\王\Pictures\Camera Roll\1.jpg')
img_tinted = img.dot([1, 0.95, 0.9])
imsave(r'C:\Users\王\Pictures\Camera Roll\1-1.jpg', img_tinted)
image = Image.open(r'C:\Users\王\Pictures\Camera Roll\1.jpg')
image.thumbnail((300, 300), Image.ANTIALIAS)
image.save(r'C:\Users\王\Pictures\Camera Roll\1-2.jpg', 'JPEG', quality=10)
网友评论