Python的PIL库中的getpixel方法 putpixel方法
python 中的 PIL 库是用来处理图片的主要用到的是 PIL.Image 这个函数a = Image.new("L",(100, 177)) # 创建一个mode 为L ,像素是(100, 177)# 的图像b = Image.new("RGB",(100, 177)) # 创建一个mode是RGB,像素是#(100, 177)的图像a.getpixel((20,20)) # 获得 图像a 中 (20, 20)这个像素点的颜色值b.putpixel((20,20)) # 给 图像 b