我有许多输入图像,包含多个较小的图像,所有这些图像都在一行中.所有包含的图像大小相同.因此,例如,image input.png可以是480×48并包含10个48×48图像,所有这些都在一行中.
使用imagemagick转换工具(或defaul imagemagick套件提供的任何其他工具),我想编写一个bash脚本,它接受输入图像,要剪切的图像数量,然后将它们全部切割成单个图像.
我可以做的用户交互,但我无法转换为实际切割.谁能提出建议?从阅读手册页,我认为这应该工作:
convert’input.png [0x0 48 48]’output.png
但是我收到一个错误:
convert: no pixels defined in cache
tb_icons_l.png' @
1.png’ @
magick/cache.c/OpenCache/3572.
convert: No IDATs written into file
coders/png.c/PNGErrorHandler/1391.
有任何想法吗?@H_301_25@