IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
$final_image = new Imagick();
$final_image->newImage( 800, 420, new ImagickPixel('#ffffff'));
$final_image->setImageFormat('jpg');
$draw = new ImagickDraw();
$draw->setFillColor('#000');
$draw->setFont('AvantGarde-Demi');
$draw->setFontSize( 30 );
//Message1 is Hello my name is
$message1= "مرحبا اسمي";
$final_image->annotateImage( $draw, 40, 20, 0, "$message1");
$final_image->annotateImage( $draw, 40, 80, 0, "this text is in english");
Below is the output,
screencapture-cdn-meaww-com-answerspictures-one_word_personality-20160811-19505031470919935-17-jpg-1470920421391.png (32.42 KiB) Viewed 12291 times