1 #-*- coding:utf-8 -*- 2 #代码版本均为python 3.5.1 3 #Level 7 4 5 from PIL import Image 6 7 x_begin, x_end = 0, 609 8 y_begin, y_end = 43, 53 9 10 11 image = Image.open("oxygen.png") 12 13 data = [chr(image.getpixel((i, 43))[0]) for i in range(0, 609, 7)] 14 #im.getpixel((x, y)) 得到某个像素点的颜色,一般返回(r, g, b) 15 16 print ("".join(data)) 17 18 msg = [105, 110, 116, 101, 103, 114, 105, 116, 121] 19 print (''.join([chr(i) for i in msg]))
下一关地址
http://www.pythonchallenge.com/pc/def/integrity.html