kmsvnc/test3.py

16 lines
418 B
Python
Raw Normal View History

2023-04-25 21:02:11 +08:00
import PIL.Image
import subprocess
import random
im = PIL.Image.new("RGB", (1920, 1080))
c = 0x000000
color = (255, 255, 255)
if 0:
if c % 256 == 0:
color = (random.randint(0, 256), random.randint(0, 256), random.randint(0, 256))
for x in range(16):
for y in range(16):
im.putpixel((x+16*8*2, y+16*0), color)
c += 1
im.save("/tmp/1.png")
subprocess.run(["ffplay", "-fs", "/tmp/1.png"])