I have tried these two approaches below with no luck. If I change the first command line and replace pango:
with caption:
it works, but prints the html markup in the text. When I use pango:
it simply fails. I can’t seem to find the right command line. Any help would be appreciated.
$upload = "db.jpg";
$gravity = "center";
$overlay_logo = "xaviators_overlay.png";
$caption_text = strtoupper("PRIVATE JET BOOM: DELIVERIES SURGE IN 2024 AMID HIGH DEMAND AND INDUSTRY CHALLENGES");
$caption1 = '<span foreground="blue">BLOG: </span>'.$caption_text;
$caption2 = '<span font="Anton-Regular.ttf" size="1024"><span foreground="blue">BLOG: </span>'.$caption_text.'</span>';
test 1:
exec("convert {$upload} -strip -thumbnail 700x700^ -gravity {$gravity} -extent 700x700 -bordercolor black -border 20
-background none -fill white -size 660x
-font Anton-Regular.ttf -pointsize 30 -gravity northwest pango:'{$caption1}' -geometry +30+30 -composite
{$overlay_logo} -gravity southeast -geometry +30+30 -composite out.jpg");
test 2:
exec("convert {$upload} -strip -thumbnail 700x700^ -gravity {$gravity} -extent 700x700 -bordercolor black -border 20
-gravity northwest pango:'{$caption2}' -geometry +30+30 -composite
{$overlay_logo} -gravity southeast -geometry +30+30 -composite out.jpg");
example test img using caption:
operator
4