首页 > 编程语言 > 详细

pythonchallenge闯关 第7题

时间:2017-10-02 00:13:08      阅读:335      评论:0      收藏:0      [点我收藏+]

7、Hint:给了一副图片‘oxygen.png‘,中间有一道马赛克

先试着把马赛克像素返回为内容

rgba模式(r=red,g=green,b=blue,a=alpha--->透明度)

这道题真的有问题……自己量的像素……

用PIL 这道题我用的python2.7

马赛克长:(1,608)宽(44,52)

每七个像素一组

技术分享
import PIL.Image
print PIL.Image.open(oxygen.png).tostring()[108188:110620:28]
(7.1)

结果是:smart guy, you made it. the next level is [105, 110, 116, 101, 103, 114, 105, 116, 121]

技术分享
import PIL.Image
print PIL.Image.open(oxygen.png).tostring()[108188:110620:28]
l = [105, 110, 116, 101, 103, 114, 105, 116, 121]
print ‘‘.join(map(chr, l))
(7.2)

替换URL为integrity

pythonchallenge闯关 第7题

原文:http://www.cnblogs.com/Zzzml/p/7618259.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!