diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 01:50:44 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 01:50:44 +0100 |
commit | 2ffd2147ff8937df1b9a5798cb7dc584059e0597 (patch) | |
tree | 1477e153d98d8dd378437bbfc4d64bdf336c80da /plugins | |
parent | 3f2f5f9403ac43b57afc246c4f27d3138f81863a (diff) |
Imager made to return grayscale images.
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/imager.py | 4 |
1 files 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" |