Rounded corners on images using PHP?

后端 未结 7 1798
孤街浪徒
孤街浪徒 2021-01-16 04:23

Does anyone know how to make a image have rounded corners using a PHP script?

7条回答
  •  别那么骄傲
    2021-01-16 04:56

    Download easyphpthumbnail.class.php from this link

    from this you can resize and convert image into rounded image.

    in below example image is converted into transparent circle image.

    include_once('easyphpthumbnail.class.php');
    $source = 'demo.jpg';
    $width      =  100;
    $height     =  100;    
    $thumb = new easyphpthumbnail;
    $thumb -> Thumbheight = $width;
    $thumb -> Thumbwidth = $height;
    $thumb -> Backgroundcolor = '#FFFFFF';
    $thumb -> Clipcorner = array(2,50,0,1,1,1,1);
    $thumb -> Maketransparent = array(1,0,'#FFFFFF',10);   
    $thumb -> Createthumb($source);
    

提交回复
热议问题