Ciao a tutti,
io ho "creato" questo codice per creare delle miniature per una galleria fotografica... ma non funziona... in pratica non mi crea la miniatura.
Dove ho sbagliato?
ecco il codice:
Codice PHP:
<?php
// Creazione della miniatura
// Ottengo le informazioni sull'immagine originale
list($width, $height, $type, $attr) = getimagesize($_FILES["imm00"]["tmp_name"]);
// imposta dimensioni miniature
$thumb_width = $width * 0.10;
$thumb_height = $height * 0.10;
// crea la miniatura
$thumb=imagecreatetruecolor($thumb_width, $thumb_height);
$image = imagecreatefromjpeg($_FILES["imm00"]["tmp_name"]);
imagecopyresampled($thumb, $image, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height);
imagejpeg($thumb,"img/img-thumb/".$_FILES["imm00"]["tmp_name"],100);
?>
Grazie in anticipo per l'aiuto.