Completely rewrote meme, removed old help page

This commit is contained in:
TheEssem 2020-01-27 15:27:33 -06:00
parent 318c30846d
commit f2bf5297a8
3 changed files with 44 additions and 127 deletions

View file

@ -1,12 +1,24 @@
file=$(mktemp /tmp/XXXXXXXXXXXXXXXXXXXXXX.png)
newfile=$(mktemp /tmp/XXXXXXXXXXXXXXXXXXXXXX.png)
convert - -resize 600x600 +profile "*" $newfile
SIZE=$(identify -format "%[fx:w]x%[fx:h]" $newfile)
convert $newfile \
-gravity north \
\( -size $SIZE -background none -font "./assets/ImpactMix.ttf" -pointsize 50 -stroke black -strokewidth 3 caption:"$1" \) -composite \
\( -size $SIZE -background none -font "./assets/ImpactMix.ttf" -pointsize 50 -fill white -stroke none caption:"$1" \) -composite \
-gravity south \
\( -size $SIZE -background none -font "./assets/ImpactMix.ttf" -pointsize 50 -stroke black -strokewidth 3 caption:"$2" \) -composite \
\( -size $SIZE -background none -font "./assets/ImpactMix.ttf" -pointsize 50 -fill white -stroke none caption:"$2" \) -composite\
-
newfile2=$(mktemp /tmp/XXXXXXXXXXXXXXXXXXXXXX.png)
convert - -resize 600x600 +profile "*" $file
SIZE=$(identify -format "%[fx:w]" $file)
convert \
-size $SIZE -background none -gravity center \
\( \( -font Impact -pointsize 40 pango:"<span foreground='white'>$1</span>" \) \
\( +clone -channel A -morphology EdgeOut Octagon +channel +level-colors black \) -compose DstOver \) -composite \
$newfile
if ! [ -z "$2" ]
then
convert \
-size $SIZE -background none -gravity center \
\( \( -font Impact -pointsize 40 pango:"<span foreground='white'>$2</span>" \) \
\( +clone -channel A -morphology EdgeOut Octagon +channel +level-colors black \) -compose DstOver \) -composite \
$newfile2
convert $file -coalesce null: -gravity north $newfile -layers composite null: -gravity south $newfile2 -layers composite -layers optimize -
exit 0
fi
convert $file -coalesce null: -gravity north $newfile -layers composite -layers optimize -
rm $file
rm $newfile
rm $newfile2