PHP | Imagick setPage() Function Last Updated : 26 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::setPage() function is an inbuilt function in PHP which is used to set the page geometry of the Imagick object. Syntax: bool Imagick::setPage( int $width, int $height, int $x, int $y ) Parameters:This function accepts four parameters as mentioned above and described below: $width: It specifies the width of the page. $height: It specifies the height of the page. $x: It specifies the x-coordinate of the page. $y: It specifies the y-coordinate of the page. Return Value: This function returns TRUE on success. Errors/Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::setPage() function in PHP: Program 1: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the Page Geometry $imagick->setPage(220, 350, 0, 5); // Get the Page Geometry $geometry = $imagick->getPage(); print_r($geometry); ?> Output: Array ( [width] => 220 [height] => 350 [x] => 0 [y] => 5 ) Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the Page Geometry $imagick->setPage(200, 100, 8, 16); // Get the Page Geometry $geometry = $imagick->getPage(); print_r($geometry); ?> Output: Array ( [width] => 200 [height] => 100 [x] => 8 [y] => 16 ) Reference: https://www.php.net/manual/en/imagick.setpage.php Comment More infoAdvertise with us Next Article PHP | Imagick setPage() Function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick setImagePage() Function The Imagick::setImagePage() function is an inbuilt function in PHP which is used to set the image page geometry. Syntax: bool Imagick::setImagePage(int $width, int $height, int $x, int $y ) Parameters: This function accepts four parameters as mentioned above and described below: $width: It specifies 1 min read PHP | Imagick resetImagePage() Function The Imagick::resetImagePage() function is an inbuilt function in PHP which is used to reset the image page. Syntax: bool Imagick::resetImagePage( string $page ) Parameters: This function accepts a single parameter $page which holds the page definition in form of WxH+x+y, where W is for width, H is f 1 min read PHP | Imagick setSize() Function The Imagick::setSize() function is an inbuilt function in PHP which is used to set the size associated with an imagick object. Syntax: bool Imagick::setSize( int $columns, int $rows ) Parameters: This function accepts two parameters as mentioned above and described below: $columns: It specifies the 1 min read PHP | Imagick setImageType() Function The Imagick::setImageType() function is an inbuilt function in PHP which is used to set the image type.Syntax:Â Â bool Imagick::setImageType( int $image_type ) Parameters: This function accepts a single parameter $image_type which contains an integer value corresponding to one of IMGTYPE constants. W 1 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 Like