和上一篇《python 图像处理类库 PIL (一)》一样,本文依然以图片 dog.jpeg 为例,演示 PIL Image 模块的实例接口。
1....导入 Image 模块,打开 dog.jpeg 图片
from PIL import Image
image = Image.open("dog.jpeg")
?
2....mode)
color mode: RGB
2.3 存储格式
format = image.format
print("image format: ", format)
image format: JPEG...,
282: (72, 1),
283: (72, 1),
296: 2,
34665: 90,
40961: 1,
40962: 320,
40963: 320},
'photoshop...R, G, B = image.split()
R.show()
G.show()
B.show()
传送门
上一篇 python 图像处理类库 PIL (一)