Using imagedestroy, imagejpeg, imagettftext, imagettfbbox, imagefill, hexdec, imagesx, imagesy, strtoupper, font, imagecreatetruecolor, Create text image in image center. imagettfbbox() Function return array index values means 0 - lower left corner, X position 1 - lower left corner, Y position 2 - lower right corner, X position 3 - lower right corner, Y position 4 - upper right corner, X position 5 - upper right corner, Y position 6 - upper left corner, X position 7 - upper left corner, Y position createTextImage.php <?php $text = strtoupper ( 'P' ) ; $imgWidth = 53 ; $imgHeight = 53 ; $font = './calibri.ttf' ; $fontSize = 12 ; $angle = 8 ; $imageColor = hexdec ( "#48A201" ) ; $textColor = hexdec ( "#FF0000" ) ; $txtImg = imagecreatetruecolor ( $imgWidth , $imgHeight ) ; imagefill ( $txtImg , 0 , 0 , $imageColor ) ; $xi = imagesx ( $txtImg ) ; $yi = imagesy ( $txtImg ) ; $textLayout ...