PHP | Imagick chopImage() Function Last Updated : 26 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::chopImage() function is an inbuilt function in PHP which is used to remove the region of an image and trim it. This function accepts the dimension of image and chops the area and the dimension from where the image is to be trim. Syntax: bool Imagick::chopImage( $width, $height, $x, $y ) Parameters: This function accepts four parameters as mentioned above and described below: $width: This parameter stores the width of the chopped area. $height: This parameter stores the height of the chopped area. $x: This parameter stores the x-origin of the chopped area. $y: This parameter stores the y-origin of the chopped area. Return Value: This function returns True on success. Original Image: Below program illustrates the Imagick::chopImage() function in PHP: 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-14.png'); // chopImage function $image->chopImage(40, 35, 1, 2); header('Content-type: image/png'); // Display the output image echo $image; ?> Output: Related Articles: PHP | Imagick autoLevelImage() Function PHP | Imagick borderImage() Function Reference: http://php.net/manual/en/imagick.chopimage.php Comment More infoAdvertise with us Next Article PHP | Imagick chopImage() Function S sarthak_ishu11 Follow Improve Article Tags : Web Technologies PHP Image-Processing PHP-function PHP-Imagick +1 More Similar Reads PHP | Imagick cropImage() Function The Imagick::cropImage() function is an inbuilt function in PHP which is used to extracts the region of the image.Syntax:  int Imagick::cropImage( $width, $height, $x, $y ) Parameters: This function accept four parameters as mention above and describe below.  $width: This parameter is used to spec 2 min read PHP | Gmagick chopimage() Function The Gmagick::chopimage() function is an inbuilt function in PHP which is used to remove the region of an image and trim it. This function accepts the dimension of image and chops the area and the dimension from where the image is to be trim.Syntax:  Gmagick Gmagick::chopimage( $width, $height, $x, 2 min read PHP | Imagick flopImage() Function The Imagick::flopImage() function is an inbuilt function in PHP which is used to create a horizontal mirror image. Syntax: bool Imagick::flopImage( void ) Parameters: This function does not accept any parameter. Return Value: This function returns True on success. Below programs illustrate the Imagi 1 min read PHP | Imagick flipImage() Function The Imagick::flipImage() function is an inbuilt function in PHP which is used to create an image generated by a mirror-reversal of an original image across a vertical mirror. Syntax: bool Imagick::flipImage( void ) Parameters: This function does not accepts any parameters. Return Value: This functio 1 min read PHP | Imagick compositeImage() Function The Imagick::compositeImage() function is an inbuilt function in PHP which is used to composite one image into another image and gives composite image. Syntax: bool Imagick::compositeImage( $composite_object, $composite, $x, $y, $channel = Imagick::CHANNEL_DEFAULT ) Parameters: This function accepts 2 min read Like