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

تعليقات

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

BlueHost Web Hosting Review: Secrets Revealed for Shared Hosting

How to Create Treeview with Bootstrap and jQuery

Submit Form using jQuery AJAX and PHP without Page Refresh