Antes que nada, hola a todos.
Hace poco cree un pequeño código que genera una imagen con la ayuda de una fuente ttf, todo iba bien hasta hace poco pero de un día para otro dejo de generar la imagen y no se porque...
Aquí esta mi código:
<?php
header("Content-Type: image/PNG" );
$font = "default.ttf";
$text = htmlspecialchars($_GET["text"]);
$fontsize = $_GET['size'];
$width = '1';
$size = imagettfbbox($fontsize, 0, $font, $text);
$x = (abs($size[0] - $size[2])) + ($width * 3);
$y = (abs($size[1] - $size[5])) + ($width * 3);
$im = imagecreatetruecolor($x, $y);
imageantialias($im, false);
$transparent = imagecolorallocate($im, 255, 255, 254);
imagefill($im, 0, 0, $transparent);
imagecolortransparent($im, $transparent);
$left = $size[0] + ($width * 2);
$bottom = ($width * 2) + $fontsize;
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagettftext($im,$fontsize,0,$left,$bottom, $black,$font,$text);
imagepng($im);
imagedestroy($im);
?>
La verdad no se que podría estar mal, siendo que antes la generaba pero ahora no...
Les agradecería de su ayuda porque esa imagen se generaba para una especie de código de seguridad en el registro de mi web