Rounds image corners. The first two parameters control the amount of rounding and the three last parameters can be used to fine-tune the rounding process. Available since 6.2.9
Touch/mouse over to see original View modified in new window.
Image
Rounds image corners. The first two parameters control the amount of rounding and the three last parameters can be used to fine-tune the rounding process. Available since 6.2.9
Parameters
x_roundingfloatx rounding
y_roundingfloaty rounding
stroke_widthfloatstroke width
displacefloatimage displace
size_correctionfloatsize correction
function roundCorners($imagePath)
{
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->setBackgroundColor('red');

    $imagick->setbackgroundcolor('pink');

    $x_rounding = 40;
    $y_rounding = 40;
    $stroke_width = 5;
    $displace = 0;
    $size_correction = 0;

    $imagick->roundCornersImage(
        $x_rounding,
        $y_rounding,
        $stroke_width,
        $displace,
        $size_correction
    );

    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}