Skip to content

Instantly share code, notes, and snippets.

@benigumocom
Created July 1, 2023 08:29
Show Gist options
  • Save benigumocom/3e1abac7410ed72d0a1698b868f2f0fb to your computer and use it in GitHub Desktop.
Save benigumocom/3e1abac7410ed72d0a1698b868f2f0fb to your computer and use it in GitHub Desktop.
グラデーションな色で塗りつぶした縁取り極太テキスト画像って使えるよな 👉 https://android.benigumo.com/20230701/imagemagick-script/
#!/bin/sh
cd ~/Desktop || exit
text=${1:-お手軽簡単!}
colors=${2:-red-orange}
font=${3:-LINE-Seed-JP_OTF-ExtraBold}
output="$text.png"
# +--5--+--5--+ 10
# +1+1+ 2
# +-4-+1+-----+ 5
magick -size 2000x200 xc:none \
-font "$font" \
-pointsize 160 \
-fill none -stroke white -strokewidth 10 \
-annotate +10+160 "$text" \
-fill none -stroke black -strokewidth 2 \
-annotate +10+160 "$text" \
-tile "gradient:$colors" \
-annotate +10+160 "$text" \
-trim \
"$output"
open -a Preview "$output"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment