Skip to content

Instantly share code, notes, and snippets.

@YuukiToriyama
Created May 20, 2019 08:27
Show Gist options
  • Save YuukiToriyama/c1d57d4dcfc1c44398caf2a17bb9c617 to your computer and use it in GitHub Desktop.
Save YuukiToriyama/c1d57d4dcfc1c44398caf2a17bb9c617 to your computer and use it in GitHub Desktop.
Create vertical lines on canvas【ImageMagick】

ImageMagickで鉄格子を描く方法

convert -size 90x1 pattern:gray50 -scale 500x500! show:

画像の高さを1ピクセルにしてパターンを適用すると、ちょうと等間隔に黒い点が打たれるようになります。まずそのような細長の画像を作って、それを-scaleオプションを使って縦に引き伸ばします。

格子線の例

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment