11 lines
251 B
Python
11 lines
251 B
Python
from PIL import Image
|
|
from mechthild import Scene
|
|
|
|
WIDTH = 800
|
|
HEIGHT = 600
|
|
|
|
render_result = Scene().render(WIDTH, HEIGHT)
|
|
rgba = bytes([int(v * 255) for v in render_result])
|
|
|
|
img = Image.frombuffer('RGBA', (WIDTH, HEIGHT), rgba)
|
|
img.save("test.png")
|