From 010f98353132329848a9b2f9865438b03a824725 Mon Sep 17 00:00:00 2001 From: "l.gabrysiak" Date: Sun, 2 Mar 2025 16:30:59 +0100 Subject: [PATCH] mod letter --- backend/open_webui/models/users.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/models/users.py b/backend/open_webui/models/users.py index bb12ed8..e5c37f2 100644 --- a/backend/open_webui/models/users.py +++ b/backend/open_webui/models/users.py @@ -395,9 +395,9 @@ class UsersTable: bbox = font.getbbox(letter) text_width = bbox[2] - bbox[0] - text_height = bbox[3] - bbox[1] - position = ((size[0] - text_width) // 2, (size[1] - text_height) // 2) - draw.text(position, letter, font=font, fill=text_color) + x = (size[0] - text_width) // 2 + y = (size[1] - bbox[1]) // 2 # Poprawione obliczenie pozycji y + draw.text((x, y), letter, font=font, fill=text_color) buffered = io.BytesIO() image.save(buffered, format="PNG")