[Level 30]
Title: relax you are on 30
relax 之后下载到 yankeedoodle.csv 文件,里面是一堆浮点数,没想出有什么用。
又要组成一幅图片,len(data)=7367=53*139,而且还要稍稍处理一下:
from PIL import Image
with open('yankeedoodle.csv') as f:
data = [d.strip() for d in f.read().split(',')]
img = Image.new('F',(53,139))
img.putdata([float(d) for d in data],256)
img = img.transpose(Image.FLIP_LEFT_RIGHT)
img = img.transpose(Image.ROTATE_90)
img.show()
嗯,是一条公式:
好了,那就获取字符吧:
by = bytes([int(x[0][5]+x[1][5]+x[2][6]) for x in zip(data[::3],data[1::3],data[2::3])])
print(by)
然后从信息中找到grandpa,[Level 31]
小结
[Image.transpose()
] [1]可对图片进行翻转或旋转操作。
[1]: https://pillow.readthedocs.io/en/4.0.x/reference/Image.html#PIL.Image.Image.transpose
网友评论