ExifTool Forum

ExifTool => Developers => Topic started by: marciano on January 25, 2020, 09:13:54 AM

Title: Changes on printing text over an image
Post by: marciano on January 25, 2020, 09:13:54 AM
Hello,

This is a part of a code I'm using for serveral years.
It prints text over a semitransparent rectangle in the upper right corner of a photo.
After switching from Centos 6/php5 to Centos 7/php7 only the semitransparent rectangle is printed but the text.

$n = "A number";
$tama = getimagesize($foto);
$width = $tama[0] ;
$height = $tama[1] ;
$a = $width - 13;
$b = $width - 2; 
$L = 140;
$A1 = "convert -size {$width}x{$height} xc:transparent \
-draw \"fill black fill-opacity 0.3 rectangle {$a},0 {$width},{$L} \
font Helvetica  font-size 13   \
fill white  \
translate {$b},{$L} rotate -90 text 0,0 'Some Text Here/{$n}' \" \
draw_mvg.png";
exec("$A1") ;
$A2 = "composite -gravity Center draw_mvg.png {$foto} {$foto}";
exec("$A2");


The text is not printed, only the rectangle
(http://i.imgur.com/SWhvtGM.png) (https://imgur.com/SWhvtGM)
Title: Re: Changes on printing text over an image
Post by: StarGeek on January 25, 2020, 10:52:43 AM
Your question seems more appropriate for the ImageMagick Forums (https://imagemagick.org/discourse-server/) since it doesn't include any calls to exiftool.
Title: Re: Changes on printing text over an image
Post by: marciano on January 25, 2020, 03:04:11 PM
Yes, sorry, my mistake