from PIL import Image

img = Image.open("D:\\pic2\\CZA3302.png")
(w,h) = img.size
im=img.convert("RGB") for i in xrange(w):
for j in xrange(h):
pos=(i,j)
rgb = im.getpixel(pos) if rgb == (186, 197, 217):
im.putpixel((i,j),(255,255,255))
if rgb == (180, 192, 213):
im.putpixel((i,j),(255,255,255))
if rgb == (168, 183, 207):
im.putpixel((i,j),(255,255,255))
if rgb == (230, 237, 241):
im.putpixel((i,j),(255,255,255))
if rgb == (155, 182, 201):
im.putpixel((i,j),(255,255,255))
if rgb == (216, 227, 235):
im.putpixel((i,j),(255,255,255))
if rgb == (247, 247, 247):
im.putpixel((i,j),(255,255,255))
if rgb == (239, 244, 247):
im.putpixel((i,j),(255,255,255)) if rgb == (238, 241, 245):
im.putpixel((i,j),(255,255,255))
if rgb == (248, 250, 252):
im.putpixel((i,j),(255,255,255))
if rgb == (192, 193, 223):
im.putpixel((i,j),(255,255,255))
if rgb == (174, 187, 210):
im.putpixel((i,j),(255,255,255))
if rgb == (209, 216, 229):
im.putpixel((i,j),(255,255,255))
if rgb == (190, 207, 221):
im.putpixel((i,j),(255,255,255))
if rgb == (156, 183, 203):
im.putpixel((i,j),(255,255,255))
if rgb == (212, 223, 232):
im.putpixel((i,j),(255,255,255)) if rgb == (197, 207, 223):
im.putpixel((i,j),(255,255,255))
if rgb == (222, 222, 239):
im.putpixel((i,j),(255,255,255))
if rgb == (222, 231, 238):
im.putpixel((i,j),(255,255,255))
if rgb == (196, 212, 223):
im.putpixel((i,j),(255,255,255))
if rgb == (233, 240, 246):
im.putpixel((i,j),(255,255,255)) im.save('D:\\Python27\\6.png')

fool的更多相关文章

  1. 【CF802L】Send the Fool Further! (hard) 高斯消元

    [CF802L]Send the Fool Further! (hard) 题意:给你一棵n个节点的树,每条边有长度,从1号点开始,每次随机选择一个相邻的点走,走到一个叶子时就停止,问期望走的总路程. ...

  2. 2015·Fool's Day·NND

    本博文没有主旨,仅仅是记录. ============================ Date:2015/4/1 - April Fool's Day! Addr:ZhongHai ======== ...

  3. The fool doth think he is wise, but the wise man knows himself to be a fool.

    The fool doth think he is wise, but the wise man knows himself to be a fool.愚者总自以为聪明,智者则有自知之明.

  4. Codeforces Round #594 (Div. 1) A. Ivan the Fool and the Probability Theory 动态规划

    A. Ivan the Fool and the Probability Theory Recently Ivan the Fool decided to become smarter and stu ...

  5. DeepFool: a simple and accurate method to fool deep neural networks

    目录 概 主要内容 二分类模型 为线性 为一般二分类 多分类问题 仿射 为一般多分类 Moosavidezfooli S, Fawzi A, Frossard P, et al. DeepFool: ...

  6. Codeforces 802L Send the Fool Further! (hard)

    Description 题面 题目大意:求从根节点出发,每次随机走一个相邻的点,问走到任意一个叶子节点经过的路径长度的期望(走到就停止) Solution 树上高斯消元,复杂度是 \(O(n)\) 的 ...

  7. 【树形DP】codeforces K. Send the Fool Further! (medium)

    http://codeforces.com/contest/802/problem/K [题意] 给定一棵树,Heidi从根结点0出发沿着边走,每个结点最多经过k次,求这棵树的最大花费是多少(同一条边 ...

  8. CF1239A Ivan the Fool and the Probability Theory

    思路: 可以转化为“strip”(http://tech-queries.blogspot.com/2011/07/fit-12-dominos-in-2n-strip.html)问题.参考了http ...

  9. CF C.Ivan the Fool and the Probability Theory【思维·构造】

    题目传送门 题目大意: 一个$n*m$的网格图,每个格子可以染黑色.白色,问每个格子最多有一个相邻格子颜色相同的涂色方案数$n,m<=1e5$ 分析: 首先,考虑到如果有两个相邻的格子颜色相同, ...

随机推荐

  1. mongodb 分组查询

    数据的保存 include_once 'mDB.class.php'; $m=new mDB(); $m->setDB('mydb'); // $m->save('stu',['dept' ...

  2. devexpress bandgridview使用总结(14.2)

    这两天利用bandgridview做表头,希望做成如下形状 在制作过程中发现如果想实现动态表头,代码的书写顺序需要稍加注意 实例化gridband 绑定gridband至bandgridview gr ...

  3. zt:synpify 综合,保持信号,时序处理

    http://www.actel.com/kb/article.aspx?id=TT1002 Logic Replication vs. Preserve Attributes in Synplici ...

  4. 文法 LL1

    <程序>-><声明列表>|<程序><函数> <声明列表>-><声明>|<声明><声明列表> ...

  5. gulp 学习笔记 (初识)

    根据极客学院入门视频整理 一.gulp介绍,主要提到了gulp是基于流式来管理运行的,目前完全搞不懂这一套专业术语. 二.gulp的安装使用. 1.首先需要在全局环境下安装gulp npm insta ...

  6. 记一次项目中的css样式复用

    本文同步至微信公众号:http://mp.weixin.qq.com/s?__biz=MzAxMzgwNDU3Mg==&mid=401616238&idx=1&sn=3c6e9 ...

  7. 正则表达式提取string 中的表名

    简单版本: Regex reg = new Regex(@"(?i)\bfrom\b(?![^\[\]]*\])\s+(\[[^\[\]]+\]|\S+)"); MatchColl ...

  8. 从零开始学 ios 的一些建议 摘自http://www.cocoachina.com/ios/20150826/13151.html

    我是一只小菜鸟,今天在cocoaChina 看到一篇关于初学者,也就是零基础的童鞋的一些建议,感觉写的好好. 我觉得,学习真的是很累,但是,你要记得一句话,,世界上最最可怕的两个字是认真.共勉! 事情 ...

  9. 有关Select option 元素

    动态添加option元素以及option元素被选中方法: function getType() { ); shadowCoverTipAdd("加载中,请稍候.."); $.aja ...

  10. frame busting

    [frame busting] 参考:http://book.51cto.com/art/201204/330076.htm