1. 100*100=(100+99+99+98)+(98+97+97+96)+...
2. the size of this image is 10000*1
3. the bread image tells some operation about rotation...
my thought is to draw the final image based on coordinateaxis
the implementation code:
>>> import Image
>>> image=Image.open('wire.png')
>>> temp=[]
>>> for i in range(100,0,-2):
temp.append([i,i-1,i-1,i-2])
>>> i=0
>>> j=0
>>> s=0
>>> region=Image.new(image.mode,(100,99))
>>> for p in temp:
box=(s,0,s+p[0],1)
region.paste(image.crop(box),(i,j,i+p[0],j+1))
box=(s+p[0],0,s+p[0]+p[1],1)
region.paste(image.crop(box).transpose(Image.ROTATE_270),(i+p[0],j,i+p[0]+1,j+p[1]))
box=(s+p[0]+p[1],0,s+p[0]+p[1]+p[2],1)
region.paste(image.crop(box).transpose(Image.ROTATE_180),(i+1,j+p[1],i+1+p[2],j+p[1]+1))
box=(s+p[0]+p[1]+p[2],0,s+sum(p),1)
region.paste(image.crop(box).transpose(Image.ROTATE_90),(i+1,j+1,i+2,j+p[1]))
s=s+sum(p)
i=i+1
j=j+1
region.save('region.png')
the result image is:, then go the the cat.html. now you would find that answer is uzi.html
2. the size of this image is 10000*1
3. the bread image tells some operation about rotation...
my thought is to draw the final image based on coordinateaxis
the implementation code:
>>> import Image
>>> image=Image.open('wire.png')
>>> temp=[]
>>> for i in range(100,0,-2):
temp.append([i,i-1,i-1,i-2])
>>> i=0
>>> j=0
>>> s=0
>>> region=Image.new(image.mode,(100,99))
>>> for p in temp:
box=(s,0,s+p[0],1)
region.paste(image.crop(box),(i,j,i+p[0],j+1))
box=(s+p[0],0,s+p[0]+p[1],1)
region.paste(image.crop(box).transpose(Image.ROTATE_270),(i+p[0],j,i+p[0]+1,j+p[1]))
box=(s+p[0]+p[1],0,s+p[0]+p[1]+p[2],1)
region.paste(image.crop(box).transpose(Image.ROTATE_180),(i+1,j+p[1],i+1+p[2],j+p[1]+1))
box=(s+p[0]+p[1]+p[2],0,s+sum(p),1)
region.paste(image.crop(box).transpose(Image.ROTATE_90),(i+1,j+1,i+2,j+p[1]))
s=s+sum(p)
i=i+1
j=j+1
region.save('region.png')
the result image is:, then go the the cat.html. now you would find that answer is uzi.html