【问题标题】:seamless join PNGs one above the other无缝拼接PNG
【发布时间】:2017-04-26 22:13:35
【问题描述】:

如何使用 ImageMagick(可能是 montage 命令)将 png 图像加入一个新的 png,其中每个输入的 png 都成为最后一个的一部分?全部垂直排列?

像这样:

2 个宽度大致相等 (±2px) 且高度不同的 png 无缝拼接在一起。

我不太介意过大/过小的宽度会发生什么。

【问题讨论】:

    标签: bash image terminal imagemagick image-editing


    【解决方案1】:
    convert 1.png 2.png -append result.png
    
    • 要对齐左边缘,请添加-gravity West
    • 要对齐右边缘,请添加-gravity East
    • 要对齐中心,请添加 -gravity center

    要在以下之间添加透明间隔:

    convert -background none 1.png -size 10x10 xc:none 2.png -append result.png
    

    哦,你已经水平了!将-append 更改为+append

    【讨论】:

      【解决方案2】:

      这个:

      convert -append img1.png img2.png out.png
      

      例如来自

      会得到

      还有:

      convert +append img1.png img2.png out2.png
      

      会产生

      【讨论】:

        猜你喜欢
        • 2011-05-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-10-26
        • 1970-01-01
        • 1970-01-01
        • 2010-12-24
        相关资源
        最近更新 更多