Rounded Image Using Laravel Intervetion

I want to Make a rounded corner image in laravel intervention. Please help me out.

enter image description here

$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

تعليقات

المشاركات الشائعة من هذه المدونة

How to Create Treeview with Bootstrap and jQuery

jQuery Datatables with PHP, MySQL and AJAX Example

How to Add Images to Dropdown List using jQuery