From 235c6183a64c1083252636444cd20822142de9b9 Mon Sep 17 00:00:00 2001 From: "U. Bruhin" Date: Tue, 26 Nov 2024 15:12:01 +0100 Subject: [PATCH] add_progressbar_to_gif.py: Fix generating large files --- tools/add_progressbar_to_gif.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/add_progressbar_to_gif.py b/tools/add_progressbar_to_gif.py index 50a1624..0fa7b14 100755 --- a/tools/add_progressbar_to_gif.py +++ b/tools/add_progressbar_to_gif.py @@ -37,7 +37,7 @@ draw.ellipse(overlay_rect, None, COLOR, 1 * overlay_scale) draw.pieslice(overlay_rect, -90, angle - 90, COLOR) overlay = overlay.resize((SIZE, SIZE), - resample=Image.Resampling.LANCZOS) + resample=Image.Resampling.NEAREST) frame.paste(overlay, overlay_position, overlay) out_frames.append(frame.convert('RGB')) @@ -49,7 +49,7 @@ (im.size[1] // 2) - (overlay_height // 2), ] overlay = overlay.resize((overlay_width, overlay_height), - resample=Image.Resampling.LANCZOS) + resample=Image.Resampling.NEAREST) last_frame = Image.new('RGBA', im.size, (0, 0, 0, 0)) last_frame.paste(out_frames[-1]) brightness = ImageEnhance.Brightness(last_frame)