Ho provato anche così ma mi da una pagina completamente vuota!
possibile che non mi da errori?
Codice PHP:
error_reporting(E_ALL);
$img = "../img/foto/tmp/209005.jpg"; // percorso al file dell'immagine
$thumbs = "ciao/"; // directory di salvataggio delle miniature create
list($width, $height) = getimagesize($img);
// dimensioni della miniatura da creare
$thumbWidth = 160; // larghezza
$thumbHeight = 120; // altezza
$thumbscale = min($thumbWidth / $width, $thumbHeight / $height);
$new_width = floor($thumbscale * $width);
$new_height = floor($thumbscale * $height);
$tmp_img = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($img);
imagecopyresampled($tmp_img, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg($tmp_img, $thumbs.'thumb.jpg', 100);
ImageDestroy($tmp_img);
echo "<img src=\"ciao/thumb.jpg\"/>";
echo "[img]$img[/img]";