I want to add an overlay text with text shadow to an image. So far I have been able to achieve this
// top text
imagettftext($im, $font_size+2, 0,
$text1_params['centered_start'],
$font_size+$margin,
$black, $font, $text1_params['text']
);
imagettftext($im, $font_size, 0,
$text1_params['centered_start'],
$font_size+$margin,
$white, $font, $text1_params['text']
);
// bottom text
imagettftext($im, $font_size, 0,
$text2_params['centered_start'] ,
$image_height-$text2_params['height']+$font_size+$margin,
$black, $font, $text2_params['text']
);
imagettftext($im, $font_size, 0,
$text2_params['centered_start']-2,
$image_height-$text2_params['height']+$font_size+$margin-2,
$white, $font, $text2_params['text']
);
This is what the result looks like-
But I want it to look like this(Notice the subtle difference in both the text shadows)-