Skip to content

Instantly share code, notes, and snippets.

@ymollard
Created August 14, 2020 08:39
Show Gist options
  • Select an option

  • Save ymollard/ce4fb56c0d748e0d0d17f9a603eeeeca to your computer and use it in GitHub Desktop.

Select an option

Save ymollard/ce4fb56c0d748e0d0d17f9a603eeeeca to your computer and use it in GitHub Desktop.
Crop screen captures and make a gif
#!/bin/bash
# Change +0+0 (+w+h) to select the upper left point of the rectangle to be cropped
for i in *png; do convert "$i" -crop 1920x1080+0+0 "cropped-$i"; done;
mkdir cropped && mv cropped*png cropped && cd cropped
convert -delay 10 *.png +repage animated.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment