1
0
forked from shaytan/rdgen

images fix

This commit is contained in:
Bryan Gerlach
2024-09-26 10:56:15 -05:00
parent d8941870b2
commit 6055b51bce

View File

@@ -242,7 +242,7 @@ def resize_and_encode_icon(imagefile):
# Check if resizing is necessary
if img.size[0] <= 256:
return base64.b64encode(imagefile.read())
return base64.b64encode(imagefile)
# Calculate resized height based on aspect ratio
wpercent = (256 / float(img.size[0]))