Imagemagick-在平铺的蒙太奇中移动/偏移图像? [英] Imagemagick - move/offset images within a tiled montage?
问题描述
考虑以下示例(Ubuntu 18.04,ImageMagick 6.9.7-4 Q16 x86_64 20170114):
Consider this example (Ubuntu 18.04, ImageMagick 6.9.7-4 Q16 x86_64 20170114):
convert -size 300x100 xc:red red.png
convert -size 100x100 xc:blue blue.png
montage red.png blue.png -frame 5 -geometry '+0+0' -tile 1x redblue.png
这给出了以下图像:
我想做的是将蓝色方块在其图块内"移动到任意x位置;例如,将蓝色正方形的左边缘对齐到红色矩形宽度的25%或50%处,或者甚至将蓝色正方形的右边缘与红色矩形的右边对齐.
What I'd like to do, is move the blue square on arbitrary x position "within its tile"; say align left edge of blue square to where 25% of the red rectangle width would be, or at 50% - or even align right edge of blue square with right edge of red rectangle.
我已经看到-tile-offset
存在( https://imagemagick.org/script/command-line-options.php#tile-offset ),而我在此示例中进行了尝试,但看起来并没有执行任何操作.
I have seen that -tile-offset
exists (https://imagemagick.org/script/command-line-options.php#tile-offset), and I've tried it with this example, but it doesn't look like it does anything.
如何在ImageMagick蒙太奇图像的一部分内移动图像?
How can I move an image, part of a ImageMagick montage, within its tile?
看起来-tile-offset
只能为显式图块图像指定(不是-tile 1x
,而是-tile red.png
),并且:
it looks like -tile-offset
can only be specified for explicit tile images (not as in -tile 1x
, but as in -tile red.png
), and: