<?
//пример из user notes
$src_img = imagecreatefromjpeg("/path/to/$my_src_file");
$dst_img = imagecreatetruecolor($dest_width,$dest_height);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $src_width, $src_height);
//$quality - качество
imagejpeg($dst_img, "/path/to/storage/new_file.jpg", $quality);
imagedestroy($src_img);
imagedestroy($dst_img);
?>