
Im basicaly trying to generate some text using my own font and then apply a dark red stroke and a black glow effect around the outside of the text.
So far my code creates this result.

and this is what I would like to generate

Heres my code so far
Code: Select all
exec("convert -size 200x50 xc:none -stroke red -strokewidth 1 -font /home/###/lib/fonts/havoc.ttf -pointsize 35 -draw \"gravity center fill white text 0,-5 \"Username\" \" temp.png 2>&1", $array);
echo "<br>".print_r($array)."<br>";
$array=array();
echo "</pre>";
// Create the shadow
exec("convert -background none -fill white temp.png -shadow 80x5+0+0 -channel A -evaluate multiply 5 +channel -trim shadow.png 2>&1", $array);
echo "<br>".print_r($array)."<br>";
$array=array();
// Combine the shadow and text
exec("convert shadow.png temp.png -gravity center -composite temp2.png 2>&1", $array);
echo "<br>".print_r($array)."<br>";
$array=array();
$size = getimagesize ("temp2.png");
$width = $size[0]+50;
$height = $size[1]+20;
// Place the text image onto a background that is 50px wider and 20px higher than the text
exec("convert -size {$width}x{$height} xc:#262422 temp2.png -gravity center -composite mezzi.jpg 2>&1", $array);
echo "<br>".print_r($array)."<br>";
echo '<img src="mezzi.jpg"/>';
unlink("temp.png");
unlink("shadow.png");
convert: Memory allocation failed `transparent'
Any ideas from anyone ?
