Skip to content

Commit

Permalink
Use a face generation algorithm compatible with our ImageMagick version
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Jun 5, 2024
1 parent 0f980be commit 011ff1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arthur/exts/systems/system_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 011ff1e

Please sign in to comment.