2013-05-13 21 views

回答

3

下面是可能的解決方案中的一種:Image.new(模式,大小,顏色)

  • 修改圖像對象包含從數據:

    1. 使用創建一個空的圖像對象在 「名單」

    2. 保存圖像

    例如:

    new_img = Image.new("L", (NEW_X_SIZE, NEW_Y_SIZE), "white") 
    new_img.putdata(new_img_list) 
    new_img.save('out.tif')