在Python上创建图像

时间:2017-11-01 19:35:17

标签: python image png

我不知道为什么我的程序不起作用。我已经尝试将其保存在我的电脑上,但它仍然给我错误maximum recursion depth exceeded in comparison

这是我的代码:

import png
from IPython.display import Image
def create(iw, ih, c=(0,0,0)):
    img=[]
    for _ in range(ih):
       row=[]
       for _ in range(iw):
          row.append(c)
      img.append(iw)
    img=create(128,128)
    save('prova.png',img)

0 个答案:

没有答案