From f8e8e7ec074d9db1144a185090dfcdd330644d70 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 2 Aug 2026 00:52:07 -0700 Subject: [PATCH] Fix paste mask argument so pasting a transparent image takes background. Otherwise, the transparent background replaces the colored background. --- stitch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stitch.py b/stitch.py index 2111bed..25b2898 100644 --- a/stitch.py +++ b/stitch.py @@ -64,7 +64,7 @@ def stitch_argparse(args): for (index_x, image) in enumerate(row): pad_x = int((column_widths[index_x] - image.size[0]) / 2) pad_y = int((row_heights[index_y] - image.size[1]) / 2) - final_image.paste(image, (offset_x + pad_x, offset_y + pad_y)) + final_image.paste(image, (offset_x + pad_x, offset_y + pad_y), mask=image) offset_x += column_widths[index_x] offset_x += args.gap offset_y += row_heights[index_y]