Código PHP:
$file = $_GET["name"];
$filename = $_SERVER["DOCUMENT_ROOT"]."/images/".$file.".png";
$percent = 1;
$newwidth = $width * $percent;
$newheight = $height * $percent;
$source = imagecreatefrompng($filename);
imagealphablending($source, true);
imagesavealpha($source, true);
$thumb = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
header("Content-type: image/png");
imagepng($thumb);