将图像的区域分为瓷砖
我有一组4500px x 3000px的图像。
在这些图像中的每一个中,我需要在5列中提取一组瓷砖,乘3行组合,每个瓷砖宽700px乘500px高。
上述复杂的是,该的起点需要在图像的左上角x:650和y:450位置。
我已经掌握了转换image.jpg -gravity Northwest -Chop 650x450 -crop 700x500 Tile-%d.jpg
这使我进入了正确的开始位置,以创建瓷砖集,但包括其余的一部分图像的右侧和底部边缘的空白区域。
我该如何解决这个问题?
I have a set of images that are 4500px x 3000px in size.
Out of each of these images I need to extract a set of tiles in a 5 columns by 3 rows combination with each tile being 700px wide by 500px high.
What complicates the above is that the starting point for this needs to be at X:650 and Y:450 position from the top left corner of the image.
I have gotten as far as convert image.jpg -gravity NorthWest -chop 650x450 -crop 700x500 tile-%d.jpg
This gets me to a correct start position for creating the tile set but includes the rest of the blank area in the right and bottom edge of the image.
How do I go about solving this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在一个ImageMagick命令中,您可以首先包含所有图块的初始矩形,然后将其裁剪成15张输出图像。尝试这样的事情...
Within a single ImageMagick command you can crop the initial rectangle that contains all the tiles first, then crop that into the 15 output images. Try something like this...