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. CentOS安装NodeJS及Express开发框架

    http://zhaohe162.blog.163.com/blog/static/38216797201402234212981/   express 命令行工具 npm install -g ex ...

  2. R语言获取国内的股票数据

    quantmod 包默认是访问 yahoo finance 的数据,其中包括上证和深证的股票数据,还有港股数据. 上证代码是 ss,深证代码是 sz,港股代码是 hk 例如苏宁云商 setSymbol ...

  3. Find the largest K numbers from array (找出数组中最大的K个值)

    Recently i was doing some study on algorithms. A classic problem is to find the K largest(smallest) ...

  4. java自定义异常(Exception、throws、try-catch)

    一.What is ... 异常处理就是容错处理机制.通过构造一个陷阱来捕获运行时的可预见错误,经对该错误进行适当处理后,让程序能继续运行不至于崩溃. 二.Who will ... 异常由系统环境引发 ...

  5. fastclick 解决js穿透问题

    http://www.tuicool.com/articles/VniQRr http://www.cnblogs.com/MrBackKom/archive/2012/06/26/2564501.h ...

  6. vim 大全用法

    vim中常用设置和操作: 在Linux系统下: 打开vi 文件: 0 数字0,跳转至行首    ^ 跳转至行第一个非空字符    $ 跳转至行尾 vim 括号匹配跳转操作: ctrl+] 跳转至函数或 ...

  7. 关于使用READ TABLE语句的几点注意事项

    原文地址   http://www.dlsap.com/thread-34-1-1.html 1.  如果使用READ TABLE语句来读取内部表数据,而不是简单看返回值判断是否存在,那么在使用REA ...

  8. Docker 不能被外网正常访问

    问题描述: 1. docker容器不能 被外部网络正常访问 2. docker所在服务器可以正常访问 3. docker启动时 报 ip_forward 错误 ARNING: IPv4 forward ...

  9. 设置mysql utf8

    1.修改mysql 配置文件my.cnf 标签[mysqld]下添加即可 character-set-server = utf8

  10. ASP.Net MVC3安全升级导致程序集从3.0.0.0变为3.0.0.1

    开发环境一般引用的是本机 C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies下的System.Web.Mvc.dll,当 ...