Image: Create round image

Created on 22 Apr 2016  路  6Comments  路  Source: Intervention/image

Hi,
how to create round image with canvas and transparent background?
Thanks!

Most helpful comment

You can use mask() with a round alpha mask.

All 6 comments

I think there is currently no way to create round images.

Do you really need round images? Maybe you just need to show the images rounded with CSS on a website? If you use Bootstrap you can use the img-circle class.

Yes, I know about border-radius: 50% make round, but is not cross browser.
There is way with php, so I guess how to do this with intervention/image...

Could you provide us a solution for Imagick and GD? If yes we could integrate it directly into Intervention/Image.

I make a quick searching and I found below, I don't test but seem working fine:
GD:
http://stackoverflow.com/questions/9880503/crop-image-in-circle-php
Imagick:
http://stackoverflow.com/questions/999251/crop-or-mask-an-image-into-a-circle

It's simple in Imagick to use the roundCorners() function to create a round image.
But I cant find a way in GD to do so.

You can use mask() with a round alpha mask.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

txusramone picture txusramone  路  6Comments

p4bloch picture p4bloch  路  6Comments

ludo237 picture ludo237  路  8Comments

REPTILEHAUS picture REPTILEHAUS  路  5Comments

DrDeath72 picture DrDeath72  路  4Comments