06-25-2022, 05:21 AM
(06-23-2022, 11:07 AM)rich2005 Wrote:Thanks for your advice. Performed following test;(06-22-2022, 03:51 PM)Stephen Liu Wrote: I'll turn to IM command which can batch processing all photos in the same folder with one command. It is very convenient.
Now I'm searching the command for complex text;
1st line - x font, x text size, x color
2nd line - y font, y text size, x color
3rd line - z font, z text size, z color
etc.
......
However, for multi-line you need something like this
Code:
mogrify \
-define jpg -font Futura-Bold.ttf -pointsize 48 -fill red -annotate +50+100 "line 1" \
-font Ubuntu-M.ttf -pointsize 48 -fill green -annotate +50+150 "line 2" \
-font Futura-Bold.ttf -pointsize 30 -fill blue -annotate +50+200 "line 3" *.jpg
Note you need the font files (ttf) in the same place as the images. Example:
$ convert \
> -define jpg -font UbuntuMono-B.ttf -pointsize 70 -fill red -annotate +450+150 "Today: June 25, 2022" \
> -font UbuntuMono-B.ttf -pointsize 60 -fill green -annotate +450+150 "Photographed at Home" \
> -font UbuntuMono-B.ttf -pointsize 60 -fill blue -annotate +450+150 "Age: 6 months" p01_60.jpg p01_60_date.jpg
Code:
convert-im6.q16: unable to read font `UbuntuMono-B.ttf' @ warning/annotate.c/RenderType/915.
$ fc-list | grep UbuntuMono-B.ttf
Code:
/usr/share/fonts/truetype/ubuntu/UbuntuMono-B.ttf: Ubuntu Mono:style=Bold
Failed
Regards