freetype y gd2
| From: | Gerardo Morales | Date: | Fri, 09 May 2003 18:47:44 +0000 |
| Subject: | freetype y gd2 | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-36038@lists.php.net to get a copy of this message | ||
Actualmente estoy utilizando la Version 4.3.1 (en apache, win32) la cual ya tiene integrado y activado gd2, he estado realizando algunas pruebas para insertar texto en un grafico y no me lo permite. cuando intento generar algun grafico me aparece el sig warning
Warning: imagettftext() [function.imagettftext]: Could not find/open font in c:\apache 1.3\apache\htdocs\menu.php on line 7
el cual tiene el siguiente codigo
<?php
header("Content-type: image/png");
$im = imagecreate(200,200);
$blanco = ImageColorAllocate($im, 255,255,255);
$negro = ImageColorAllocate($im, 0,0,0);
$azul = ImageColorAllocate($im, 0,0,255);
ImageTTFText($im, 20, 0, 10, 20, $azul, "arial.ttf", "texto");
imagepng($im);
imagedestroy($im);
?>
Dentro de php.ini esta habilitado gd2
Al usar phpinfo me despliega
gd
GD Support enabled GD Version bundled (2.0 compatible) FreeType Support enabled FreeType Linkage with freetype JPG Support enabled PNG Support enabled WBMP Support enabled
Ya he intentado poniendol rutas absolutas, relativas, usar dirname etc y me sigue marcando el mismo mensaje de error. El archivo arial.ttf esta en el mismo directorio que el archivo menu.
No se si sea necesario que actualice la version de GD que tiene esta version de php, instalarle otra version de freetype o cual puede ser el problema con esto.
Saludos