我正在尝试使用GraphicsMagick的蒙太奇工具旋转2张图片,分别在每张图片周围放置一个边框,并将背景颜色设置为蓝色。但是,我只能成功旋转图像或设置边框,但不能同时设置两者。这是每个设计?还是一个bug?或者我只是说错了?
这是我正在运行的命令
gm montage -background blue -borderwidth 5 -bordercolor white -rotate 15 <input1>.jpg <input2>.jpg <output>.jpg
答案 0 :(得分:1)
这是你用ImageMagick做到的,但是GraphicsMagick似乎并不想做旋转和边框。
1.png
是红色方块
2.png
是一个蓝色方块
{ convert -background cyan -bordercolor lime 1.png -rotate 15 -border 5 miff:-; convert -background yellow -bordercolor magenta 2.png -rotate 15 -border 5 miff:-; } | montage -background blue miff:- result.jpg
ImageMagick的另一个选择是这样的:
convert -background cyan -bordercolor lime 1.png -rotate 15 -border 5 \( -background yellow -bordercolor magenta 2.png -rotate 15 -border 5 \) +append result.png
或者这个:
convert -background cyan -bordercolor lime 1.png -rotate 15 -border 5 \
\( -background yellow -bordercolor magenta 2.png -rotate 15 -border 5 \) \
-append result.png