From 2ffd2147ff8937df1b9a5798cb7dc584059e0597 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 01:50:44 +0100 Subject: Imager made to return grayscale images. --- plugins/imager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/imager.py b/plugins/imager.py index 7c26092..84d6ca2 100755 --- a/plugins/imager.py +++ b/plugins/imager.py @@ -22,14 +22,14 @@ salis.sm_getSize.restype = c_uint def makeImage(iname): salis.s_load(bytes(iname, "utf-8")) lsize = int(salis.sm_getSize() ** 0.5) - image = Image.new("RGB", (lsize, lsize), "black") + image = Image.new("L", (lsize, lsize), "black") pixels = image.load() for y in range(lsize): for x in range(lsize): addr = (y * lsize) + x byte = salis.sm_getByteAt(addr) - pixels[x, y] = (byte // 4, byte // 2, byte) + pixels[x, y] = byte salis.s_quit() oname = iname + ".png" -- cgit v1.2.1