I find a solution: compile a new version of gd.so!

In short terms, a wrote:

        cd /usr/src
        apt-get source php3
        cd php
        ./configure --with-gd --with-jpeg-dir=/usr/include
                --with-ttf=/usr/include/freetype
        make        (<-- this is optional, I suppose)
        mkdir apache
        cd apache
        gcc -g -O2 -shared -fPIC -DCOMPILE_DL=1 -I.. -I.
                -I/usr/include/apache-1.3 -I/usr/include/freetype -o gd.so
                ../functions/gd.c ../functions/gdcache.c ../functions/gdttf.c
                -lgd -lttf  -lc
        mv gd.so /usr/lib/php3/apache

This generate a new version of gd.so with png,jpeg & truetype support.

You can look a example at:

http://www.pucela.com/php/text1.php3

<?php
error_reporting(15);
dl("gd.so");
Header("Content-type: image/gif");
$im = imagecreate(500,400);
$white = ImageColorAllocate($im, 255,255,255);
ImageTTFText($im, 50, 325, 50, 50, $white, "/usr/share/fonts/arial.ttf",
        "Testing... Omega: &#937;\r\nEspañoles: áéíóúñÑüÜ");
imagegif($im);
//imagepng($im);
//imagejpeg($im);
ImageDestroy($im);
?>


And with a little work I succeed to compile a version with libgd-gif
support plus (added -lgd-gif to gcc and

#define HAVE_GD_GIF 1

to config.h)

-----------------------------------8<-----------------------------------
/ Asesora y Proveedora                   [EMAIL PROTECTED]
\ de Servicios de Internet, S.L.         [EMAIL PROTECTED]
-----------------------------------8<-----------------------------------



--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to