PHP | Imagick::shaveImage() Function Last Updated : 26 Aug, 2019 Comments Improve Suggest changes Like Article Like Report 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 accepts two parameters as mentioned above and described below: $columns: This parameter is used to set the column pixel of image. $rows: This parameter is used to set the row pixel of image. Return Value: This function returns True on success. Below program illustrates the Imagick::shaveImage() function in PHP: Program: php <?php // Create an imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); // Use shaveImage function $imagick->shaveImage(100, 50); header("Content-Type: image/jpg"); // Display the output image echo $imagick->getImageBlob(); ?> Output: Reference: http://php.net/manual/en/imagick.shaveimage.php Comment More infoAdvertise with us Next Article PHP | Imagick::shaveImage() Function V vijay_raj Follow Improve Article Tags : Misc Web Technologies PHP Image-Processing PHP-function PHP-Imagick +2 More Practice Tags : Misc Similar Reads 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 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 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 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 spliceImage() Function The Imagick::spliceImage() function is an inbuilt function in PHP which is used to splices a solid color into the image. Syntax: bool Imagick::spliceImage( $width, $height, $x, $y ) Parameters: This function accepts four parameters as mentioned above and described below: $width: This parameter is us 1 min read Like