cercado in rete ho trovato questo che ho addattato alle mie esigenze:
<?php
$nomeimage = $indice;
$new_width=640;
$new_height=480;
$ncompression=90;
$source_path="./caertella";
$destination_path="./cartella/due";
$destimg=ImageCreateTrueColor($new_width,$new_heig ht);
$srcimg=ImageCreateFromJPEG($source_path.$nomeimag e);
ImageCopyResampled($destimg,$srcimg,0,0,0,0,$new_w idth,$new_height,ImageSX($srcimg),ImageSY($srcimg) );
Imagejpeg($destimg,$destination_path.$nomeimage,90 );
?>
ma l'immagine mi esce completamente sgranata