ecco ho fatto così:
<?php
$filename = './img/1.jpg';
list($width, $height) = getimagesize($filename);
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);
imagejpeg($image_p, "./img/1.jpg", 10);
?>
grazie per l'aiuto![]()