тынц код (+/-)
function create_img($name_big, $name_small, $xs, $ys)
{
list($x, $y, $t, $attr) = getimagesize($name_big);
if ($t == IMAGETYPE_GIF) {
$big = imagecreatefromgif($name_big);
} elseif ($t == IMAGETYPE_JPEG) {
$big = imagecreatefromjpeg($name_big);
} elseif ($t == IMAGETYPE_PNG) {
$big = imagecreatefrompng($name_big);
} else {
return;
}
$small = imagecreatetruecolor($xs, $ys);
imagesavealpha($small, true);
$trans_colour = imagecolorallocatealpha($small, 0, 0, 0, 127);
imagefill($small, 0, 0, $trans_colour);
$red = imagecolorallocate($small, 255, 0, 0);
imagefilledellipse($small, 400, 300, 400, 300, $red);
$res = imagecopyresampled($small, $big, 0, 0, 0, 0, $xs, $ys, $x, $y);
imagedestroy($big);
imagepng($small, $name_small);
imagedestroy($small);
}
if (isset($_FILES["filename"]["tmp_name"]) && is_uploaded_file($_FILES["filename"]["tmp_name"])) {
var_dump($_FILES);
create_img('' . $_FILES["filename"]["tmp_name"] . '', '6-1.png', 110, 70);
create_img('' . $_FILES["filename"]["tmp_name"] . '', '6-1-1.png', 15, 15);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Отправка файла на сервер</title>
</head>
<body>
<form enctype="multipart/form-data" method="post">
<p><input type="file" name="filename">
<input type="submit" value="Отправить"></p>
</form>
</body>
</html>
Пути только к файлам измени.