fool

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了fool相关的知识,希望对你有一定的参考价值。

?????????tpi   weight   port   image   pil   range   pytho   import   get   

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的主要内容,如果未能解决你的问题,请参考以下文章

CF191C Fools and Roads

Fools and Roads CodeForces - 191C

HDU 6555 The Fool(打表&整除分块)

2015·Fool's Day·NND

CF802L Send the Fool Further! (hard) 树上高斯消元

CF802LSend the Fool Further! (hard) 高斯消元