Skip to content

Instantly share code, notes, and snippets.

@mnmly
Created November 25, 2020 19:16
Show Gist options
  • Save mnmly/641d8ebad81173428a36044b74789525 to your computer and use it in GitHub Desktop.
Save mnmly/641d8ebad81173428a36044b74789525 to your computer and use it in GitHub Desktop.
convert-tile
#!/usr/bin/env bash
dir="$(dirname "$1")"
base=$(basename "$1" | cut -d. -f1)
out="$dir/$base-%d03.jpg"
convert "$1" -crop 2x2@ +repage +adjoin "$out"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment