Simulates an image shadow.
function shadowImage($image_path, $opacity, $sigma, $x, $y)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagick->shadowImage($opacity, $sigma, $x, $y /* 0.4, 10, 50, 5*/ );
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}