Skip to content

Instantly share code, notes, and snippets.

@Vassago1911
Created December 5, 2022 11:39
Show Gist options
  • Save Vassago1911/485273c51501f6bc6b27cba796ac3989 to your computer and use it in GitHub Desktop.
Save Vassago1911/485273c51501f6bc6b27cba796ac3989 to your computer and use it in GitHub Desktop.
Make a stack of pngs of the same size (e.g. from a 3d render) into a gif
#e.g. add as command in your .bashrc, .zshrc, or just put in your favourite python mini-scripts :D
alias stack_pngs="python -c 'import imageio.v3 as iio; import os; import numpy as np; A = np.array([ iio.imread(fi) for fi in sorted(os.listdir()) if \".png\" in fi ]); iio.imwrite(\"stacked.gif\",A,frames_per_second=30)'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment