PHP | Imagick extentImage() Function Last Updated : 26 Aug, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The Imagick::extentImage() function is an inbuilt function in PHP which provides the method for setting the image size. This method sets the image size and allows to set x, y coordinates where the new area of the image begins. Syntax: bool Imagick::extentImage( $width, $height, $x, $y ) Parameter: This function accept four parameters as mentioned above and described below: $width: This parameter stores the value of the new width. $height: This parameter stores the value of the new height. $x: This parameter stores the value of X position for the new size. $y: This parameter stores the value of Y position for the new size. Return Value: This function returns True on success. Original Image: Below program illustrates the Imagick::extentImage() function in PHP: Program: php <?php /*require_once('path/vendor/autoload.php');*/ /*Imagick Object*/ $image = new \Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-17.png'); /*Set Background Color*/ $image->setImageBackgroundColor('orange'); /*extentImage*/ $image->extentImage( $image->getImageWidth(), $image->getImageHeight(), -100, -100 ); /*Image Header*/ header("Content-Type: image/jpg"); // Display output image echo $image->getImageBlob(); ?> Output: Reference: http://php.net/manual/en/imagick.extentimage.php Comment More infoAdvertise with us Next Article PHP | Imagick extentImage() Function S sarthak_ishu11 Follow Improve Article Tags : Technical Scripter Web Technologies PHP Image-Processing PHP-function PHP-Imagick +2 More Similar Reads PHP | Imagick flattenImages() Function The Imagick::flattenImages() function is an inbuilt function in PHP which is used to merges the sequence of images. This is useful for combining Photoshop layers into a single image. Syntax: Imagick Imagick::flattenImages( void ) Parameters: This function does not accept any parameter. Return Value: 1 min read PHP | Imagick enhanceImage() Function The Imagick::enhanceImage() function is an inbuilt function in PHP which is used to improve the quality of a noisy image. This function applies the digital filter to improve quality. Syntax: bool Imagick::enhanceImage( void ) Parameter: This function does not accepts any parameter. Return Value: Thi 1 min read PHP | Imagick appendImages() Function The Imagick::appendImages() function is an inbuilt function in PHP which is used to append set of images. This function appends a set of images into a single image. Syntax: Imagick::appendImages( $stack ) Parameters: This function accepts a single parameters $stack which is mandatory. If the stack v 2 min read PHP | Imagick frameImage() Function The Imagick::frameImage() function is an inbuilt function in PHP which is used to add a three-dimensional border around the image. Syntax: bool Imagick::frameImage( $color, $width, $height, $inner_bevel, $outer_bevel ) Parameters: This function accepts five parameters as mentioned above and describe 2 min read PHP | Imagick addImage() Function The Imagick::addImage() function is an inbuilt function in PHP which is used to adds new image to Imagick object image list. After the operation iterator position is moved at the end of the list. This function adds new image to Imagick object from the current position of the source object. The Imagi 1 min read Like