垂直组合图像与水平偏移

时间:2017-01-01 12:14:59

标签: imagemagick image-manipulation imagemagick-montage

@ https://superuser.com/questions/290656/combine-multiple-images-using-imagemagick

阅读这些帖子我能够垂直连接图像,但是如果你看到结果..底部图像需要一个轻微的像素偏移(因为它的y轴是2位数值,而上图像是y轴的3位数字,x轴相同且恒定间隔)

如果我可以给底部图片略微轻推一下,x轴会显得更合适

单个图像(相同尺寸) enter image description here enter image description here

结果 enter image description here

1 个答案:

答案 0 :(得分:1)

您可以在底部左侧放置一个10像素透明的"填充物" 图像,如下所示:

convert -background none top.png \
  \( -size 10x10 xc:none bottom.png +append \) -append result.png

enter image description here

我已将填充物设为绿色,以便您可以看到它。

enter image description here

因此,作为解释,+append将与左侧的第一张图片和右侧的后续图片并排追加,而-append将从上到下追加顶部的第一张图片和下面的图片。

如果要附加到左侧或上方,请使用-reverse之类的运算符来反转帧的顺序。