Shines a distant light on an image to create a three-dimensional effect. You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis. Available since 6.2.9
Touch/mouse over to see original View modified in new window.
Image
Shines a distant light on an image to create a three-dimensional effect. You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis. Available since 6.2.9
Parameters
grayboolA value other than zero shades the intensity of each pixel.
azimuthfloatDefines the light source direction.
elevationfloatDefines the light source direction.
function shadeImage($imagePath)
{
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->shadeImage(true, 45, 20);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}