I want to get my image - resize it and place it in the middle of a bigger new image. This is what I have, help
$filename = "images/" . $_GET['file'];
header('Content-Type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = 50;
$newheight = 50;
$dest = imagecreate(500, 500);
$src = imagecreatefromjpeg("$filename");
imagecopyresized($thumb, $src, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagecopymerge($dest, $thumb, 10, 10, 0, 0, 100, 47, 75);