#! /opt/bin/dash # # extract and regenerate animated gif # convert delay is in hundreths of a second, # loop 0 is infinite, loop 5 is five times, etc., # dispose previous hides prior frame # refs: https://webinista.com/updates/how-to-create-animated-gifs-imagemagick/ # https://imagemagick.org/Usage/anim_basics/ mkdir -p classical quantum #what="classical" #delay=15 #f="../Andela_files/Classic-computer.gif" what="quantum" delay=20 f=../Andela_files/Quantum-computer-maze.gif g="$what/%03d.gif" convert "$f" "$g" convert -delay "$delay" -loop 1 -dispose previous $what/*.gif $what.gif