par
fabrice88v » 15 mars 2016, 10:20
Bonjour;
pour créer de miniature png j’utilise cette fonction :
Code : Tout sélectionner
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);
}
mon soucis et que si le png est d'origine avec un fond transparent la miniature ressort avec un fond noir.
existe t'il un moyen d’éviter ce problème ?
Merci
Bonjour;
pour créer de miniature png j’utilise cette fonction :
[code] 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);
}
[/code]
mon soucis et que si le png est d'origine avec un fond transparent la miniature ressort avec un fond noir.
existe t'il un moyen d’éviter ce problème ?
Merci