Tengo el siguiente texto y queria saber si algun genio sabe como adaptarlo para
- Cambiar la fuente gdf por una ttf
- Centrar el texto
- Rotarlo
Código PHP:
<?php
$string1 = $_GET['line1']; // lets get the text from the form
$string2 = $_GET['line2']; // lets get the text from the form
$string3 = $_GET['line3']; // lets get the text from the form
$string4 = $_GET['line4']; // lets get the text from the form
$im = imagecreatefromjpeg("burbuja.jpg"); // define what image we want to write on
$textcolor = imagecolorallocate($im, 0, 0, 0); // define the text color, red, green, blue
$font = imageloadfont('sylfaen.gdf'); // tells it what font to use
imagestring($im, $font, 15, 0, $string1, $textcolor); // first line
imagestring($im, $font, 18, 25, $string2, $textcolor); // 2 line
imagestring($im, $font, 38, 50, $string3, $textcolor); // 3 line
imagestring($im, $font, 98, 75, $string4, $textcolor); // 4 line
header("Content-type: image/jpeg"); // header to tell the browser it's an image
imagejpeg($im); // creates the image with text
imagedestroy($im); // destroys the image in the memory
?>
Saludos