kmsvnc/test2.py
2023-04-25 21:02:11 +08:00

10 lines
278 B
Python

import PIL.Image
import subprocess
im = PIL.Image.new("RGB", (1920, 1080))
c = 0
for y in range(1080):
for x in range(1920):
im.putpixel((x, y), (c >> 16, c >> 8 & 0xff, c & 0xff))
c += 1
im.save("/tmp/1.png")
subprocess.run(["ffplay", "-fs", "/tmp/1.png"])