私はpngの背景にユーザー画像をマージするPHPコードを使用しています。ここで私は使用しているコードです。 どのように背景画像上の画像をマージする
but i got this result when i save image
$width = 140;
$height = 140;
$bottom_image = imagecreatefrompng("bg.png");
$top_image = imagecreatefromjpeg("default.jpg");
imagesavealpha($top_image, true);
imagealphablending($top_image, false);
imagecopyresampled($bottom_image, $top_image, 290, 125, 0, 0, $width, $height, $width, $height);
//imagecopy($bottom_image, $top_image, 290, 125, 0, 0, $width, $height);
header('Content-type: image/png');
imagepng($bottom_image);
は、私は戻って丸い円の中にユーザ画像をしたいです。
http://stackoverflow.com/questions/999251/crop-or-mask-an-image-into-a-circle/999563#999563 – C2486