python脚本之RGB,将其转化为图片
12345678910111213141516#!/usr/bin/env pythonfrom PIL import ImageMAX = 280pic = Image.new("RGB",(MAX, MAX))file = open("flag.txt",'r')m = file.read().split('\n')i=0for y in range (0,MAX): for x in range (0,MAX): if(m[i] == '(0, 0, 0)'): pic.putpixel([x,y],(0, 0, 0)) else: pic.putpixel([x,y],(255,255,255)) i = i+1pic.show()pic.save("flag.png")
RGB
Your support will encourage me to continue to create!