带注释的Imagemagick平铺

时间:2014-03-06 06:23:07

标签: imagemagick overlay tiling

我正在分割一个大图像:

convert input.jpg -crop 2256x3043 +repage +adjoin output-%02d.jpg

如何在每张图像的中心添加图块编号?

感谢。

1 个答案:

答案 0 :(得分:0)

好的,我终于找到了解决方案:

convert input.jpg \
        -crop 2256x3043 +repage +adjoin \
        -pointsize 300 -gravity Center -annotate 0 "%[p]" \
        output-%02d.jpg

这将分割2256x3043大的图块中的图像,并使用大尺寸字体在中心写入图块的编号(从0开始)。我使用Imagemagick escape property %p得到它,定义为:

  

当前图像列表中的图像索引