Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_seq_putdata.py
- from Tkinter import *
- from PIL import Image, ImageTk
- import random
- ww = 600
- hh = 600
- root = Tk()
- root.title("Tk_seq_putdata")
- root.geometry("%dx%d+0+0"%(ww,hh))
- def rgb2hex(r,g,b):
- return '#%02X%02X%02X'%(r,g,b)
- def draw():
- image.putdata([z*i for z in range(360000)])
- photo = ImageTk.PhotoImage(image)
- canvas.create_image(0,0,image=photo,anchor=NW)
- canvas.update()
- 0
- canvas = Canvas(root, width=ww, height=hh)
- canvas.pack()
- image = Image.new("RGB", (600,600), (255,255,255))
- rgb = 16777215
- for i in range(1,rgb):
- draw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement