Python切分圖像小案例(1、3、2、4象限子圖互換)

rom PIL import Image im = Image.open('test.bmp') size = im.size # 獲取4個象限中的子圖 box1 = (0, size[1]//2, size[0]//2, size[1]) region1 = im.crop(box1) box2 = (0, 0, size[0]//2, size[1]//2) region2 = im.crop
相關文章
相關標籤/搜索