Created
May 27, 2019 19:35
-
-
Save YuukiToriyama/e2e017c025d89f0baf45c1f7758e79ac to your computer and use it in GitHub Desktop.
またつまらないシェル芸を作ってしまった
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
convert -size 1500x500 pattern:checkerboard -fill Black -pointsize 400 -font "Symbola" -draw 'text 30,350 "Sh ell 💩"' -write mpr:L -crop 500x500+0+0! -virtual-pixel none -distort Perspective '0,0 100,350 500,0 100,150 0,500 250,400' -write mpr:tmp +delete mpr:L -crop 500x500+500+0! -virtual-pixel none -distort Perspective '0,0 100,150 500,0 250,100 0,500 250,200' mpr:tmp -composite -write mpr:tmp +delete mpr:L -crop 500x500+1000+0! -virtual-pixel none -distort Perspective '0,0 250,200 500,0 400,150 0,500 250,400' mpr:tmp -composite unko.png |
2019/07/27改良版
変更点
- 単純でつまらない投影図法をやめ、一点透視図法に変更しました。
- 背景を付けました
-write mpr:~~
オプションを使って一時的なデータを保存するやりかたから、丸括弧を使って表現する方向に切り替えました- 前者の場合純粋にワンライナーとして書けているような気がして好きなのですが、かえってややこしそうなのでカッコを使ってネストで書くことにしました。
コード
convert -size 600x600 pattern:CheckerBoard \
\( -font "IPA-P明朝" -background Snow -gravity Center label:"Sh" -virtual-pixel None -distort Perspective '0,0 100,200 600,0 300,320 0,600 140,400 600,600 300,500' \
\( label:"ell" -virtual-pixel None -distort Perspective '0,0 300,320 600,0 500,200 0,600 300,500 600,600 460,400' \) -composite \
\( label:"芸" -virtual-pixel None -distort Perspective '0,0 100,200 600,0 300,100 0,600 300,320 600,600 500,200' \) -composite \) -composite shellgei.png
資料
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
実行結果
