Se hai il nome ed il percorso dell'immagine questo codice funziona:

Codice PHP:
header('Content-type: image/jpeg');
list(
$oldWidth$oldHeight) = getimagesize("nome_immagine");
$newWidth $oldWidth 0.5;
$newHeight $oldHeight 0.5;
$img imagecreatetruecolor($newWidth$newHeight);
$src imagecreatefromjpeg("nome_immagine");
imagecopyresized($img$src0000$newWidth$newHeight$oldWidth$oldHeight);
imagejpeg($img);
imagedestroy($img);