PHP | Imagick shadeImage() Function
The Imagick::shadeImage() function is an inbuilt function in PHP which is used to creates a 3D effect of given image. Shines a distant light on an image to create a three-dimensional effect. The azimuth is measured in degrees of x-axis and elevation is measured in pixels above the z-axis.
Syntax:
bool Imagick::shadeImage( $gray, $azimuth, $elevation )
Parameters: This function accepts three parameters as mentioned above and described below:
- $gray: This parameter stores the value other than zero and shades the intensity of each pixel.
- $azimuth: This parameter stores the value of the light source direction. It is measured in degrees of the x-axis.
- $elevation: This parameter stores the value of the light source direction. It is measured in pixels above the z-axis.
Return Value: This function returns True on success.
Original Image:

Below programs illustrates the Imagick::shadeImage() function in PHP:
Program:
<?php // require_once('path/vendor/autoload.php'); // Create an Imagick Object $imagick = new Imagick( // shadeImage Function $imagick->shadeImage(true, 45, 20); // Image Header header("Content-Type: image/jpg"); // Display the image echo $imagick->getImageBlob(); ?> |
Output:

Related Articles:
Reference: http://php.net/manual/en/imagick.shadeimage.php
Recommended Posts:
- PHP | Imagick getImageChannelRange() Function
- PHP | Imagick getImageScene() Function
- PHP | Imagick getQuantumDepth() Function
- PHP | Imagick getQuantumRange() Function
- PHP | Imagick getPackageName() Function
- PHP | Imagick setImageOpacity() Function
- PHP | Imagick minifyImage() Function
- PHP | Imagick setImageRenderingIntent() Function
- PHP | Imagick modulateImage() Function
- PHP | Imagick queryFonts() Function
- PHP | Imagick rotationalBlurImage() Function
- PHP | Imagick getVersion() Function
- PHP | Imagick getImageSignature() Function
- PHP | Imagick getImageTicksPerSecond() Function
- PHP | Imagick getInterlaceScheme() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



