def main():
im = Image.open('terrain.png')
ter = im.load()
terr = []
for row in range(500):
trow = []
for col in range(400):
if ter[col,row][0:3] not in terrains:
print((row,col))
trow.append(5)
else:
trow.append(terrains[ter[col,row][0:3]])
terr.append(trow)
source = (200, 200)
destination = (300, 300)
File "/Users/pranushasoma/Downloads/hw1b.py", line 175, in main
if ter[col,row][0:3] not in terrains:
IndexError: image index out of range
对于这个错误我能做些什么?在
目前没有回答
相关问题 更多 >
编程相关推荐