fix for images not needing resize

This commit is contained in:
Bryan Gerlach
2024-09-26 09:54:43 -05:00
parent 8b86886686
commit 6642a777ef

View File

@@ -239,7 +239,7 @@ def resize_and_encode_icon(iconfile):
# Check if resizing is necessary # Check if resizing is necessary
if iconimg.size[0] <= 256: if iconimg.size[0] <= 256:
return base64.b64encode(iconfile.read()).decode('utf-8') return base64.b64encode(iconfile.read())
# Calculate resized height based on aspect ratio # Calculate resized height based on aspect ratio
wpercent = (256 / float(iconimg.size[0])) wpercent = (256 / float(iconimg.size[0]))