Hello,
j'ai été me documenter sur le imagecopyresized mais ça ne fonctionne pas!
Voici mon code :
// Relocalisation du fichier uploadé
$destination_tmp="/public_html/test/images/produits/tmp/test2.jpg";
$destination="/public_html/test/images/produits/photos/pisc.jpg";
if(move_uploaded_file($_FILES['frm_file']['tmp_name'],"$destination_tmp")) {
// Content type
header('Content-type: image/jpeg');
// Calcul des nouvelles dimensions
list($width, $height) = getimagesize($destination_tmp);
$new_width = "150px";
$new_height = $height * $new_width / $height;
imagecopyresized ( $destination, $destination_tmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
Il me fait bien la copie sur mon répertoire tmp mais il ne me la redimentionne pas dans (…)
Forum Programmation.php resizeimage
21
nov.
2005