Skip to content

Instantly share code, notes, and snippets.

@technikhil314
Created May 15, 2021 10:16
Show Gist options
  • Save technikhil314/51d8978e777f60fece6a39fee48dfcae to your computer and use it in GitHub Desktop.
Save technikhil314/51d8978e777f60fece6a39fee48dfcae to your computer and use it in GitHub Desktop.
shell script using imagemagick cli
#!/bin/bash
arr=( "user1"
"user2"
"user3"
)
for i in "${arr[@]}"
do
convert -font 'Sacramento' -fill '#CC6478' -pointsize 42 -gravity center -draw "text 90,-20 '$i'" template.png ./outputDir/$i.png
convert -font helvetica -fill '#444' -pointsize 18 -gravity northwest -draw "text 264,425 '15 Aug 2020'" ./outputDir/$i.png ./outputDir/$i.png
convert -composite -gravity northwest -geometry +550+340 ./outputDir/$i.png signature.png ./outputDir/$i.png
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment