如下所示:
from PIL import Image########獲取圖片指定像素點的像素def getPngPix(pngPath = "aa.png",pixelX = 1,pixelY = 1): img_src = Image.open(pngPath) img_src = img_src.convert('RGBA') str_strlist = img_src.load() data = str_strlist[pixelX,pixelY] img_src.close() return dataprint(getPngPix())以上這篇python使用PIL模塊獲取圖片像素點的方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持武林站長站。
新聞熱點
疑難解答