1.读写
open(路径)
save(路径)
show()
https://www.cnblogs.com/sun-haiyu/p/7127582.html
2.格式转换
convert('')
https://blog.csdn.net/icamera0/article/details/50843172
3.矩阵和图像的转换
img = np.asarray(image)
Image.fromarray(np.uint8(img))
https://www.cnblogs.com/gongxijun/p/6114232.html
4.通道 split and merge
from PIL import Image
img=Image.open('test.jpg')
img.show()
img=img.split()
R=img[0]
G=img[1]
B=img[2]
G.show()
print("show success")
merge_pic=Image.merge('RGB',[R,G,B])
merge_pic.show()
print("show merge")
https://blog.csdn.net/guduruyu/article/details/70837779
https://blog.csdn.net/mokeding/article/details/17618861
网友评论