Skip to content

Instantly share code, notes, and snippets.

@nitinthewiz
Created August 10, 2016 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nitinthewiz/d6bebb2e1dc3b39df0dee915f3de0cbc to your computer and use it in GitHub Desktop.
Save nitinthewiz/d6bebb2e1dc3b39df0dee915f3de0cbc to your computer and use it in GitHub Desktop.
#!/bin/bash
for f in *.png
do
echo "Processing $f file"
convert $f -crop 1024x77+0+0 +repage first.png
convert $f -crop 1024x50+0+440 +repage second.png
convert $f -crop 1024x902+0+788 +repage third.png
montage first.png second.png third.png -tile x3 -geometry +0+0 final-$f
done
# http://www.cyberciti.biz/faq/bash-loop-over-file/
# http://www.imagemagick.org/discourse-server/viewtopic.php?t=21597
# http://www.imagemagick.org/Usage/montage/
# http://www.imagemagick.org/Usage/crop/
# http://kylepurdon.com/blog/waybacklapse-a-python-wayback-machine-time-lapse-creator.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment