我试图交织两张图片。
图1 图2 至此
def interWeave(pic, picture):
w=getWidth(pic)
h=getHeight(pic)
newPic=makeEmptyPicture(w,h)
for x in range (0,w):
for y in range (0,h):
p=getPixel(pic,x,y)
p2=getPixel(picture,x,y)
newPxl=getPixel(newPic,x,y)
if (x>=0 and x<20) or (x>=40 and x<60)or (x>=80 and x<=100):
color = getColor(p)
else:
color=getColor(p2)
setColor(newPxl, color)
return (newPic)
但我明白了:
有人知道我在做什么错吗?