mirror of
https://github.com/bryangerlach/rdgen.git
synced 2025-11-29 08:33:23 +00:00
fix for images not needing resize
This commit is contained in:
@@ -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]))
|
||||||
|
|||||||
Reference in New Issue
Block a user