WARNING!

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

ATTENTION !

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...

How well does it work ?

Est-ce efficace ?

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é.

Before correction<br>Avant la correctionAfter correction<br>Après la correction
truecolor PNG with black text
image truecolor avec du texte en noir

Before correction<br>Avant la correctionAfter correction<br>Après la correction
truecolor PNG with black text with 50% transparency
image truecolor avec du texte en noir à 50% de transparence

How to apply the patch ?

Comment appliquer le patch ?

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.

How do I test the patch is working fine ?

Comment puis-je tester que le patch fonctionne correctement ?

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 (400300);
    
$background_color ImageColorAllocate ($im255255255);
    
$text_color ImageColorAllocate ($im000);

    
ImageFilledRectangle($im00399299$background_color);
    
ImageTTFText ($im80100100$text_color'tahoma.ttf''user@domain.net');

    
ImagePng($im);
?>

For further questions send me a mail to this address yann at this site

Pour toute question concernant ce patch, envoyez moi un mail à yann arobasse ce site

18882 access to this page since march 21st, 2002.
18882 accès à cette page depuis le 21 mars 2002.

Valid HTML 4.01!