Simulates an image shadow.
Image
Simulates an image shadow.
Parameters
opacityfloat
sigmafloat
xint
yint
function shadowImage($imagePath)
{
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->shadowImage(0.4, 10, 50, 5);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}