This rule in my view is not so easy to figure out....
however, the code is generated depends on others' solution:
>>> data=[]
>>> image=Image.open('/home/****/Downloads/mozart.gif')
>>> for i in range(0,480):
data=[image.getpixel((j,i)) for j in range(0,640)]
for p in range(0,640):
if data[p]==195:
new=data[p:]+data[:p]
break;
for m,x in enumerate(new):
image.putpixel((m,i),x)
>>> image.save('c.gif')
the answer is 'romance.html'
however, the code is generated depends on others' solution:
>>> data=[]
>>> image=Image.open('/home/****/Downloads/mozart.gif')
>>> for i in range(0,480):
data=[image.getpixel((j,i)) for j in range(0,640)]
for p in range(0,640):
if data[p]==195:
new=data[p:]+data[:p]
break;
for m,x in enumerate(new):
image.putpixel((m,i),x)
>>> image.save('c.gif')
the answer is 'romance.html'
本文介绍了一种通过Python操作图片像素的方法,实现特定效果——将图片旋转以形成浪漫风格。通过对图片像素进行抓取、处理及重新设置,最终完成图片的视觉变换。
1414

被折叠的 条评论
为什么被折叠?



