Skip to content

Instantly share code, notes, and snippets.

@vipulgupta2048
Created June 15, 2020 20:35
Show Gist options
  • Select an option

  • Save vipulgupta2048/34a80ca526b13e9c0bf988441ae063bc to your computer and use it in GitHub Desktop.

Select an option

Save vipulgupta2048/34a80ca526b13e9c0bf988441ae063bc to your computer and use it in GitHub Desktop.
party_saver (Part of PartyStarter)
def party_saver(file):
images_list = []
for filename in glob(
"~/partystarter/output/" + file + "/*.png"
):
frame = Image.open(filename)
images_list.append(frame)
images_list[0].save(
f"{file}.gif",
save_all=True,
optimize=True,
append_images=images_list,
transparency=True,
loop=0,
duration=180,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment