Overlaying an image's filename using ImageMagick (or similar)

后端 未结 4 1602
悲哀的现实
悲哀的现实 2021-02-05 12:58

I know ImageMagick\'s annotate command can superimpose some text over an image, but can it use the image\'s filename as this text? I would\'ve assumed so, but can\

4条回答
  •  情歌与酒
    2021-02-05 13:25

    Building on Steve Czetty's solution, it looks like you can set the text size and color of the annotation, using -pointsize and -fill, respectively.

    Here's an example:

    convert input.jpg -gravity south -pointsize 24 -fill yellow -annotate 0 '%f' output.jpg
    

    Obviously, you can change the text size from 24 points to something else, as well the color, from 'yellow' to some other color, as per your preference.

提交回复
热议问题