Skip to content

Instantly share code, notes, and snippets.

@tdukart
Last active November 2, 2018 21:30
Show Gist options
  • Save tdukart/ec9a69da628e866dfe9c4e5800f652ed to your computer and use it in GitHub Desktop.
Save tdukart/ec9a69da628e866dfe9c4e5800f652ed to your computer and use it in GitHub Desktop.
Bulk image generator using ImageMagick.
#!/bin/bash
DATE=`date +%Y%m%d`
mkdir $DATE
for i in {1..10}; do
convert -size 300x200 gradient:red-darkred -draw "gravity center fill white font-size 144 text 0,0 ' ${i} '" $DATE/300x200_$i.jpg
convert -size 700x600 gradient:blue-darkblue -draw "gravity center fill white font-size 288 text 0,0 ' ${i} '" $DATE/700x600_$i.jpg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment