aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/exts/systems/system_information.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-06-05 01:46:05 +0100
committerGravatar Joe Banks <[email protected]>2024-06-05 01:46:05 +0100
commit011ff1e77a83f0af54c34107e9f4fa711ea8d547 (patch)
tree137aa6a5fb815d8a254d95a38b7f78160d3fdfa8 /arthur/exts/systems/system_information.py
parentMerge pull request #202 from python-discord/jb3/features/face-generator (diff)
Use a face generation algorithm compatible with our ImageMagick version
Diffstat (limited to 'arthur/exts/systems/system_information.py')
-rw-r--r--arthur/exts/systems/system_information.py5
1 files 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 @@ I enjoy talking to you. Your mind appeals to me. It resembles my own mind except
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)