Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- #!/bin/bash
- #
- # usage: avatar.sh a
- #
- # generate alphabet example:
- # for x in {a..z}; do ./avatar.sh $x; done
-
- imgtxt=$1
- final=$imgtxt.png
-
- if [ -z "$imgtxt" ]; then
- echo "usage: avatar.sh text"
- exit 1
- fi
-
- echo "Generating image..."
-
- DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- #font_reg=$DIR/fonts/Lora-Regular.ttf
- font_reg=$DIR/fonts/OpenSans-Regular.ttf
-
- # Generate post text
- convert -background white -fill black -font $font_reg -size 512x512 -pointsize 300 -gravity center -interline-spacing 0 caption:"$imgtxt" $final
-
- echo "DONE. See $(pwd)/$final"
|