from PIL import Image
image = Image.open("lena.jpg")
buffer=[]
for pixel in image.getdata():
buffer.append((
pixel[0],
pixel[1],
pixel[2],
pixel[3]-150,
))
image.putdata(buffer)

image.save('python_filter2.png')

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

change the value of the alpha channel

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄