public function get_lt_rounder_corner($radius) { $img = imagecreatetruecolor($radius * 2, $radius * 2); // 创建一个正方形的图像 $bgcolor = imagecolorallocate($img, 255, 255, 255); // 图像的背景 $fgcolor = imagecolorallocate($img, 0, 0, 0); imagefill($img, 0, 0, $bgcolor); imagefilledarc($img, $radius, $radius, $radius * 2, $radius * 2, 180, 180, $fgcolor, IMG_ARC_PIE); // 将弧角图片的颜色设置为透明 imagecolortransparent($img, $fgcolor); // 变换角度 // $img = imagerotate($img, 90, 0); // $img = imagerotate($img, 180, 0); // $img = imagerotate($img, 270, 0); // header('Content-Type: image/png'); // imagepng($img); return $img; }
以上就介绍了 PHP制作圆角图片,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
已抢65421个
抢已抢29739个
抢已抢16297个
抢已抢8242个
抢已抢10698个
抢已抢21538个
抢