@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

ImageMagickでトリミング/クロッピングする

convert input.png -crop 640x480+40+30 output.png

640x480+40+30の部分は [width]x[height][left][top] left, topは+10や-90など指定できる。 はみ出した部分の背景色は参考ページだとgifで黒くなっていた。他のオプションで背景色を指定できそう。

参考

Cutting and Bordering -- IM v6 Examples

おまけ

上記ページに載っているが、identifyコマンドで、どこをクロップしたか探せる模様。

identify input.png output.png