使用imagemagick的蒙太奇命令将平铺图像粘贴在一起,而无需调整大小 [英] Glueing tile images together using imagemagick's montage command without resizing

查看:671
本文介绍了使用imagemagick的蒙太奇命令将平铺图像粘贴在一起,而无需调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个相当普遍的问题,所以我会用尽可能多的关键字来问它!

This seems like it might be a reasonably common question, so I'm going to ask it using as many keywords as I can think of!

我有一个一堆(好的,九个)瓷砖jpegs,标准的瓷砖文件名。每个jpeg为220x175像素:

I have a bunch of (well, nine) tile jpegs, with standard tile filenames. Each jpeg is 220x175 pixels:

(top row)
tile_1_0_0.jpg
tile_1_1_0.jpg
tile_1_2_0.jpg
(middle row)
tile_1_0_1.jpg
tile_1_1_1.jpg
tile_1_2_1.jpg
(bottom row)
tile_1_0_2.jpg
tile_1_1_2.jpg
tile_1_2_2.jpg

我如何使用imagemagick / montage来粘合或将它们连接在一起,形成一个连贯的图像?我根本不想调整它们的大小,所以我猜最终的图像应该是660x525。

How can I use imagemagick/montage to 'glue' or join them all together to make a single, coherent image? I don't want to resize them at all, so I guess the final image should be 660x525.

这将是蒙太奇,没有框架,阴影,边界等等 - 只有九个原始图像,粘在一起制作一个jpeg。

That would be montage with no framing, shadowing, bordering, etc - just the nine original images, glued together to make a single jpeg.

我知道它应该是这样的东西,但我正在努力获得订单和尺寸右:

I know it should be something along these lines, but I'm struggling with getting the order and sizing right:

montage +frame +shadow +label -tile 3x3 -geometry <options> *.jpg joined.jpg


推荐答案

我当时想做类似的东西,最终在这里(我猜你的尽可能多的关键字的东西工作)。这就是我想出的对我有用的东西。 (根据您的需要调整几何和平铺)

I was looking to do something similar and ended up here (I guess your "as many keywords as possible" thing worked). Here's what I came up with that worked for me. (geometry and tile adjusted for your needs)

montage -border 0 -geometry 660x -tile 3x3 tile* final.jpg

文件水平添加到图块中,因此,对于 -tile 4x2 ,处置将是:

The files get added to the tiles horizontally, so, for -tile 4x2, the disposition would be:

1 2 3 4
5 6 7 8

数字是参数列表中文件名的相对位置。

The numbers being the relative positions of the filenames in the argument list.

据我所知, tile * 将按字母顺序展开,因此您应该手动指定文件名,或者重命名,以便它们适当地排序,例如:

As far as I can tell, tile* will expand alphabetically, so you should either specify your filenames manually, or rename then so that they'll sort appropriately, e.g.:

# top row
tile_r0_c0.jpg
tile_r0_c1.jpg
tile_r0_c2.jpg
# middle row
tile_r1_c0.jpg
tile_r1_c1.jpg
tile_r1_c2.jpg
# bottom row
tile_r2_c0.jpg
tile_r2_c1.jpg
tile_r2_c2.jpg

这篇关于使用imagemagick的蒙太奇命令将平铺图像粘贴在一起,而无需调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆