fool
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的更多相关文章
- 【CF802L】Send the Fool Further! (hard) 高斯消元
[CF802L]Send the Fool Further! (hard) 题意:给你一棵n个节点的树,每条边有长度,从1号点开始,每次随机选择一个相邻的点走,走到一个叶子时就停止,问期望走的总路程. ...
- 2015·Fool's Day·NND
本博文没有主旨,仅仅是记录. ============================ Date:2015/4/1 - April Fool's Day! Addr:ZhongHai ======== ...
- 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.愚者总自以为聪明,智者则有自知之明.
- 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 ...
- DeepFool: a simple and accurate method to fool deep neural networks
目录 概 主要内容 二分类模型 为线性 为一般二分类 多分类问题 仿射 为一般多分类 Moosavidezfooli S, Fawzi A, Frossard P, et al. DeepFool: ...
- Codeforces 802L Send the Fool Further! (hard)
Description 题面 题目大意:求从根节点出发,每次随机走一个相邻的点,问走到任意一个叶子节点经过的路径长度的期望(走到就停止) Solution 树上高斯消元,复杂度是 \(O(n)\) 的 ...
- 【树形DP】codeforces K. Send the Fool Further! (medium)
http://codeforces.com/contest/802/problem/K [题意] 给定一棵树,Heidi从根结点0出发沿着边走,每个结点最多经过k次,求这棵树的最大花费是多少(同一条边 ...
- CF1239A Ivan the Fool and the Probability Theory
思路: 可以转化为“strip”(http://tech-queries.blogspot.com/2011/07/fit-12-dominos-in-2n-strip.html)问题.参考了http ...
- CF C.Ivan the Fool and the Probability Theory【思维·构造】
题目传送门 题目大意: 一个$n*m$的网格图,每个格子可以染黑色.白色,问每个格子最多有一个相邻格子颜色相同的涂色方案数$n,m<=1e5$ 分析: 首先,考虑到如果有两个相邻的格子颜色相同, ...
随机推荐
- maven出现 -Dmaven.multiModuleProjectDirectory system propery错误
1.使用myeclipse10整合maven插件时出现错误: -Dmaven.multiModuleProjectDirectory system propery is not set. Check ...
- javascript知识点总结----函数内部属性
在函数内部,有两个特殊的对象:argumengs和this 1.函数的参数 ECMAScript函数不介意传递进来多少个参数,也不在乎传进来的参数是什么数据类型,也就是说:你定义的函数只接收2个参数, ...
- 如何使用SQLPLUS分析SQL语句(查询执行计划跟踪)
方法一:autotrace 1, connect sys/密码 as sysdba,在sys用户下运行$ORACLE_HOME/sqlplus/admin/plustrce.sql这段sql的实际内 ...
- Hadoop 调研笔记
由于从各光伏电站采集的数据量较大,必须解决海量数据的查询.分析的问题.目前主要考虑两种方式:1. Hadoop大数据技术:2. Oracle(数据仓库)+BI: 本文仅介绍hadoop的技术 ...
- Finish 和 Complete 的区别
2012年,在伦敦举行的语言大赛中,圭亚那选手Samsunder Balgobin 在回答比赛中最后一道问题 "你如何用一种容易让人理解的方式解释 complete与finished 的区別"时, ...
- AspNet MVC与T4,我定制的视图模板
一. 遇到的问题 文章开头部分想先说一下自己的困惑,在用AspNet MVC时,完成Action的编写,然后添加一个视图,这个时候弹出一个添加视图的选项窗口,如下: 很熟悉吧,继续上面说的,我添加一个 ...
- python之路——面向对象(进阶篇)
面向对象进阶:类成员.类成员的修饰符.类的特殊成员 类成员 类成员分为三大类:字段.方法.属性 一.字段 静态字段 (属于类) 普通字段(属于对象) class City: # 静态字段 countr ...
- java查看当前项目所有线程列表界面
java查看当前项目所有线程列表界面 1.TestThread(测试类) package com.isoftstone.pcis.isc.job.king.panel; public class Te ...
- Java数据类型转换
一.Date与String相互转换 1.Date转换成String SimpleDateFormat dd = new SimpleDateFormat("yyyy-MM-dd HH:mm& ...
- div赋值,取值和input赋值,取值
一.div取值 <div id="txtXiaofei" class="txt-panel">你好</div> 获取div的值$(&qu ...