From 011ff1e77a83f0af54c34107e9f4fa711ea8d547 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Wed, 5 Jun 2024 01:46:05 +0100 Subject: [PATCH] Use a face generation algorithm compatible with our ImageMagick version --- arthur/exts/systems/system_information.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arthur/exts/systems/system_information.py b/arthur/exts/systems/system_information.py index 03182b1..3ea28e7 100644 --- a/arthur/exts/systems/system_information.py +++ b/arthur/exts/systems/system_information.py @@ -172,9 +172,10 @@ async def face( with Image(file=image_bytes) as img: img.resize(resolution, resolution) - img.type = "grayscale" - img.kmeans(number_colors=2) + img.quantize(number_colors=2, treedepth=8, dither=True) + + img.type = "grayscale" img.format = "png" img.save(file=out_bytes)