Voilà ca ca marche impec encore merci!
Maintenant j'ai un problème avec une autre carte que j'essaie de faire générer.
CODE
<?php
header ("Content-type: image/Png");
$im = imagecreatefromgif('url.gif');
$img = imagecreatefromgif('url.gif');
//On définit les couleurs
$audessusvingtsix = imagecolorallocate($im, 254, 0, 225);
$audessusvingt = imagecolorallocate($im, 180, 0, 50);
$audessusquatorze = imagecolorallocate($im, 220, 75,30);
$audessushuight = imagecolorallocate($im, 254, 150, 0);
$audessusdeux = imagecolorallocate($im, 254, 225, 0);
$audessusmoinsquatre = imagecolorallocate($im, 0, 240, 40);
$audessusmoinsdix = imagecolorallocate($im, 0, 230, 160);
$audessusmoinsseize = imagecolorallocate($im, 0, 150, 254);
$audessusmoinsvinght = imagecolorallocate($im, 0, 50, 254);
$audessusmoinstrente = imagecolorallocate($im, 200, 0, 254);
$audessusmoinstrentesix = imagecolorallocate($im,50, 0, 50);
///boucle
for ($y=0; $y<650; $y+10) {
for ($x=0; $x<800; $x+10) {
$color = imagecolorat($img, $x, $y);
if($color == '32')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "> 32", $audessusvingtsix);
}
elseif($color == '30')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "30", $audessusvingtsix);
}
elseif($color == '29')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "28", $audessusvingtsix);
}
elseif($color == '26')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "26", $audessusvingtsix);
}
elseif($color == '24')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "24", $audessusvingt);
}
elseif($color == '18')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "22", $audessusvingt);
}
elseif($color == '16')
{
$x /= 1.037;
$y /= 1.4;
imagestring($im, 2, $x, $y, "20", $audessusvingt);
}
elseif($color == '17')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "18", $audessusquatorze);
}
elseif($color == '19')
{
$x /= 1.037;
$y /= 1.4;
imagestring($im, 2, $x, $y, "16", $audessusquatorze);
}
elseif($color == '21')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "14", $audessusquatorze);
}
elseif($color == '22')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "12", $audessushuight);
}
elseif($color == '23')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "10", $audessushuight);
}
elseif($color == '33')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "8", $audessushuight);
}
elseif($color == '34')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "6", $audessusdeux);
}
elseif($color == '35')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "4", $audessusdeux);
}
elseif($color == '36')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "2", $audessusdeux);
}
elseif($color == '37')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "0", $audessusmoinsquatre);
}
elseif($color == '8')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-2", $audessusmoinsquatre);
}
elseif($color == '9')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-4", $audessusmoinsquatre);
}
elseif($color == '10')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-6", $audessusmoinsdix);
}
elseif($color == '11')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-8", $audessusmoinsdix);
}
elseif($color == '13')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-10", $audessusmoinsdix);
}
elseif($color == '15')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-12", $audessusmoinsseize);
}
elseif($color == '14')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-14", $audessusmoinsseize);
}
elseif($color == '12')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-16", $audessusmoinsseize);
}
elseif($color == '6')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-18", $audessusmoinsvinght);
}
elseif($color == '4')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-20", $audessusmoinsvinght);
}
elseif($color == '5')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-22", $audessusmoinsvinght);
}
elseif($color == '7')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-24",$audessusmoinstrente);
}
elseif($color == '25')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-26",$audessusmoinstrente);
}
elseif($color == '28')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-28",$audessusmoinstrente);
}
elseif($color == '31')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-30",$audessusmoinstrente);
}
elseif($color == '27')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-32",$audessusmoinstrente);
}
elseif($color == '34')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-34",$audessusmoinstrente);
}
elseif($color == '2')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "-36",$audessusmoinstrente);
}
elseif($color == '1')
{
$x /= 1.037;
$y /= 1.4;
$x = round($x,0);
$y = round($y,0);
imagestring($im, 2, $x, $y, "<-36",$audessusmoinstrentesix);
}
else
{
}
}
}
imagepng($im);
imagedestroy($im);
?>
Et voilà le message d'erreur afficher à l'écran
L'image «url.php » ne peut être affichée, car elle contient des erreurs.
J'ai fait clic droit pour voir les erreurs mais ca ne m'affiche rien !
Pourtant tout mon code ) l'air bon !
J'espère que vous pourrez m'aider à bientôt.