[英]How should three images be tiled using ImageMagick montage?
I want to tile three images into a rectangle. 我想将三个图像平铺成一个矩形。 Two of the images are to be on the left, on top of each other and set to the same width, and the remaining image is to be on the right.
其中两个图像应位于左侧,彼此顶部并设置为相同的宽度,其余图像应位于右侧。
---------
| 1 | |
|---| 3 |
| 2 | |
---------
I know that four images can be tiled using a command of the form following form: 我知道可以使用以下形式的命令来平铺四个图像:
montage 1.png 2.png 3.png 4.png -mode Concatenate -tile 2x2 out.png
---------
| 1 | 2 |
|---|---|
| 3 | 4 |
---------
What would be the right command for tiling the three images? 平铺这三个图像的正确命令是什么?
For the specifics, the full rectangle is of the dimensions 1920 x 1080. Image 1 should be made to fit in 480 x 864 (maintaining its aspect ratio), image 2 is 480 x 216 and image 3 is 1440 x 1080. 具体来说,整个矩形的尺寸为1920 x1080。应将图像1调整为480 x 864(保持其长宽比),图像2为480 x 216,图像3为1440 x 1080。
-------------
| 1 | |
|---| 3 |
| 2 | |
-------------
Like this should work for you: 这样应该适合您:
convert \( 1.png -resize 480x864 \) 2.png -append 3.png +append result.png
Note that -append
will append below, whereas +append
will append to the right. 请注意,
-append
将附加在下面,而+append
将附加在右边。
If you want to force image2
to align with the bottom of image3
, you can cause image1
to fill the entire allotted space like this: 如果要强制
image2
与image3
的底部对齐,可以使image1
像这样填充整个分配的空间:
convert \( 1.png -resize 480x864 -extent 480x864 \) 2.png -append 3.png +append result.png
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.