开发者

Generating x number of pictures

开发者 https://www.devze.com 2023-03-02 15:50 出处:网络
I need to generate pictures with a certain size (in pixels). Each picture will have an incrementing number in it. That is all that will be in the picture, a number. I\'v开发者_运维问答e been thinking

I need to generate pictures with a certain size (in pixels). Each picture will have an incrementing number in it. That is all that will be in the picture, a number. I'v开发者_运维问答e been thinking of using photoshop but I have no idea how the scripting works. Any suggestions or examples I could use?


Try using ImageMagick (http://www.imagemagick.org) and its text handling feautures (http://www.imagemagick.org/Usage/text/).


Here is a way of doing that using 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

And the result:

Generating x number of pictures

Generating x number of pictures

Generating x number of pictures

Generating x number of pictures

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号