Gif ne s'affiche pas
Posté : 23 août 2010, 09:13
Bonjour,
j'ai un soucis avec les images gif qui ne veulent pas s'afficher.
voici le code pour autoriser les extension
j'ai un soucis avec les images gif qui ne veulent pas s'afficher.
voici le code pour autoriser les extension
if ($tableau[2] == 2) {
$img_in = imagecreatefromjpeg($file);
imagecopyresampled($img_out, $img_in, 0, 0, 0, 0, $new_largeur, $new_hauteur, $tableau[0], $tableau[1]);
header("Content-type: image/jpg");
imagejpeg($img_out);
}
// si notre image est de type png
elseif ($tableau[2] == 3) {
$img_in = imagecreatefrompng($file);
imagecopyresampled($img_out, $img_in, 0, 0, 0, 0, $new_largeur, $new_hauteur, $tableau[0], $tableau[1]);
header("Content-type: image/png");
imagepng($img_out);
}
elseif ($tableau[2] == 4) {
$img_in = imagecreatefrompng($file);
imagecopyresampled($img_out, $img_in, 0, 0, 0, 0, $new_largeur, $new_hauteur, $tableau[0], $tableau[1]);
header("Content-type: image/gif");
imagepng($img_out);
}