Possible Duplicate:
How do I resize pngs with transparency in PHP?
I have a script which creates a PNG by combining multiple files:
$img_width = 950;
$img_height = 950;
$final_img = imagecreatetruecolor($img_width, $img_height);
imagesavealpha($final_img, true);
$trans_colour = imagecolorallocatealpha($final_img, 0, 0, 0, 127);
imagefill($final_img, 0, 0, $trans_colour);
foreach ($images_array as $image) {
$image_layer = imagecreatefrompng($image);
imagecopy($final_img, $image_layer, 0, 0, 0, 0, $img_width, $img_height);
}
imagesavealpha($final_img, true);
imagealphablending($final_img, true);
header('Content-Type: image/png');
imagepng($final_img);
All the images I'm combining at 950px square. How can I make it so the returned image is say 200 x 200 ?
Thanks