Skip to content

Commit

Permalink
add_progressbar_to_gif.py: Fix generating large files
Browse files Browse the repository at this point in the history
  • Loading branch information
ubruhin committed Nov 26, 2024
1 parent a9e1149 commit 235c618
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/add_progressbar_to_gif.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))

Expand All @@ -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)
Expand Down

0 comments on commit 235c618

Please sign in to comment.