This patch is designed for GD 2.0.1 which is OLD, upgrade your PHP and/or GD, it solves the problem and some others too
Ce patch est conçu pour GD 2.0.1 qui est une vieille version. Mettez plutôt à jour votre GD et/ou PHP, les dernièes versions corrigent ce problème et bien d'autres en même temps.
Are you runing PHP under windows ? Yes ? Then click here...
Vous utilisez PHP sous windows ? Alors allez donc jeter un coup d'œil ici...
Simply compare the left images with the right images, left are images generated with the original gd, right images are generated with my patch applied against gd.
Un comparaison rapide entre les images de gauche et de droite valent, je crois, tous les discours. Les images de gauche ont été générées avec gd sans le patch, celles de droites une fois le patch appliqué.
![]() | ![]() |
| truecolor PNG with black text image truecolor avec du texte en noir | |
![]() | ![]() |
| truecolor PNG with black text with 50% transparency image truecolor avec du texte en noir à 50% de transparence | |
There are 2 solutions, download gdft.c.diff and apply it on gdft.c, or download a patched version of gdft.c. Then recompile gd.
Il y a 2 solutions, téléchargez gdft.c.diff et patchez gdft.c avec ou téléchargez directement une version patchée de gdft.c.
Here's a small example I used to generate the image to show my email, you should of course get the same result as me ! :-)
Voici un court exemple qui m'a servi à créer l'image contenant mon mail, le résultat que vous obtenez doit être identique au miens, cela va de soi ! :-)
<?php
header ("Content-type: image/png");
$im = @ImageCreateTrueColor (400, 300);
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 0, 0, 0);
ImageFilledRectangle($im, 0, 0, 399, 299, $background_color);
ImageTTFText ($im, 8, 0, 100, 100, $text_color, 'tahoma.ttf', 'user@domain.net');
ImagePng($im);
?>
For further questions send me a mail to this address 
Pour toute question concernant ce patch, envoyez moi un mail à 
18450 access to this page since march 21st, 2002.
18450 accès à cette page depuis le 21 mars 2002.