I want to Make a rounded corner image in laravel intervention. Please help me out.
$image = Image::make($user['profile_pic'])->fit(300, 300, function ($constraint){
$constraint->aspectRatio();
});
$image->encode('png');
$width = $image->getWidth();
$height = $image->getHeight();
$mask = Image::canvas($width, $height);
// draw a white circle
$mask->circle(280, $width / 2, $height / 2, function ($draw)
{
$draw->background('#fff');
});
$image->mask($mask, false);
$img->insert($image, 'top-left', 50, 48);
Make a circle Using the Above code, I want to make in rounded corner Image. Thank you in advance.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3j6khma
via IFTTT
Aucun commentaire:
Enregistrer un commentaire