fix: joker images stretch to fill body area equally for big/small

This commit is contained in:
Poker Design Developer
2026-06-04 22:09:08 +08:00
parent 194e42a026
commit aed831fc8c
2 changed files with 3 additions and 11 deletions

View File

@@ -331,7 +331,7 @@ def draw_joker(canvas, design, which, project, card_key, asset):
offset_y = int(body_h * image_dy)
img_copy = asset.copy()
img_copy.thumbnail((body_w, half_h), Image.LANCZOS)
img_copy = img_copy.resize((body_w, half_h), Image.LANCZOS)
if image_scale != 1:
sw = max(1, int(img_copy.width * image_scale))
sh = max(1, int(img_copy.height * image_scale))