alpha channel

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')

change the value of the alpha channel

posted on 2019-04-24 13:11  Leung_ss  阅读(243)  评论(0编辑  收藏  举报

导航