生成x个图片

时间:2011-05-04 15:37:28

标签: image photoshop-script

我需要生成一定大小的图片(以像素为单位)。每张图片中都会有一个递增的数字。这就是图片中的所有内容,一个数字。我一直在考虑使用Photoshop,但我不知道脚本是如何工作的。我可以使用的任何建议或例子吗?

2 个答案:

答案 0 :(得分:4)

尝试使用ImageMagick(http://www.imagemagick.org)及其文本处理功能(http://www.imagemagick.org/Usage/text/)。

答案 1 :(得分:1)

以下是使用ImageMagick执行此操作的方法:

#!/bin/bash
for i in {0..3}; do
   echo Generating $i...
   convert -size 256x256 xc:black \
           -gravity south -background orange -splice 0x20 -annotate +0+2 "$i" image-$i.png
done

结果:

enter image description here enter image description here enter image description here enter image description here

相关问题