PHP | Imagick rotateImage() Function Last Updated : 26 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::rotateImage() function is an inbuilt function in PHP which is used to rotate an image by a given angle and the empty spaces filled with given color. Syntax: bool Imagick::rotateImage( $background, $degrees ) Parameters: This function accepts two parameters as mentioned above and described below: $background: This parameter is used to set the background color of image. Datatype of this can be string as well as float. $degrees: This parameter is used to set the angle by which the image is rotated. The rotation angle is interpreted as clockwise. Return Value: This function returns True on success. Below program illustrate Imagick::rotateImage() function in PHP: Original Image: Program: php <?php // require_once('path/vendor/autoload.php'); // Create a new imagick object $image = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-12.png'); // Function to rotate an Image $image->rotateimage('green', 25); header("Content-Type: image/jpg"); // Display the output echo $image->getImageBlob(); ?> Output: Related Articles: PHP | Imagick borderImage() Function PHP | Imagick annotateImage() Function Reference: http://php.net/manual/en/imagick.rotateimage.php Comment More infoAdvertise with us Next Article PHP | Imagick rotateImage() Function sarthak_ishu11 Follow Improve Article Tags : Misc Web Technologies PHP Image-Processing PHP-Imagick +1 More Practice Tags : Misc Similar Reads PHP | Gmagick rotateimage() Function The Gmagick::rotateimage() function is an inbuilt function in PHP which is used to rotate an image in the specified number of degrees. The background empty triangles filled with the background color.Syntax:Â Â Gmagick Gmagick::rotateimage ( $color, $degrees ) Parameters: This function accepts two par 2 min read PHP | Imagick removeImage() Function The Imagick::removeImage() function is an inbuilt function in PHP which is used to remove an image from the image list. This function removes the current image which is pointed by the cursor. Syntax: bool Imagick::removeImage( void ) Parameters: This function doesnât accepts any parameters. Return V 1 min read PHP | Imagick rollImage() Function The Imagick::rollImage() function is an inbuilt function in PHP which is used to roll an image. Syntax: bool Imagick::rollImage( $x, $y ) Parameters: This function accepts two parameters as mentioned above and described below: $x: This parameter stores the value of the X offset. $y: This parameter s 1 min read PHP | Imagick readImage() Function The Imagick::readImage() function is an inbuilt function in PHP which is used to read an image from filename. Syntax: bool Imagick::readImage( string $filename ) Parameters:This function accepts a single parameter $filename which holds the name of the file. It can also accept URL of the file. Return 1 min read PHP | Imagick shadeImage() Function The Imagick::shadeImage() function is an inbuilt function in PHP which is used to creates a 3D effect of a 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: 1 min read PHP | Imagick textureImage() Function The Imagick::textureImage() function is an inbuilt function in PHP which creates repeatedly tiles the texture image. Syntax: Imagick Imagick::textureImage( $texture_wand ) Parameter: This function accepts single parameter $texture_wand. It is an Imagick object to use as texture image. Return Value: 1 min read PHP | Imagick readImages() Function The Imagick::readImages() function is an inbuilt function in PHP which is used to read images from an array of filenames and associate them to a single Imagick object. Syntax: bool Imagick::readImages( array $filenames ) Parameters:This function accepts a single parameter $filenames which holds an a 2 min read PHP | Imagick scaleImage() Function The Imagick::scaleImage() function is an inbuilt function in PHP which is used to scale the size of an image to the given dimensions. Syntax: bool Imagick::scaleImage( int $cols, int $rows, bool $bestfit = false, bool $legacy = false ) Parameters: This function accepts four parameters as mentioned a 2 min read PHP | Imagick::shaveImage() Function The Imagick::shaveImage() function is an inbuilt function in PHP which is used to shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image. Syntax: bool Imagick::shaveImage( $columns, $rows ) Parameters: This function ac 1 min read PHP | Imagick sampleImage() Function The Imagick::sampleImage() function is an inbuilt function in PHP which is used to scale an image to the desired dimensions with pixel sampling.This method does not introduce any additional color into the scaled image like other resizing methods. Syntax: bool Imagick::sampleImage( int $rows, int $co 1 min read Like