PHP | Imagick resizeImage() Function Last Updated : 05 Dec, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::resizeImage() function is an inbuilt function in PHP which is used to scale an image to the desired dimensions. Syntax: bool Imagick::resizeImage( int $columns, int $rows, int $filter, float $blur, bool $best_fit = false, bool $legacy = false ) Parameters: This function accepts six parameters as mentioned above and described below: $columns: It specifies the width of the image. $rows: It specifies the height of the image. $filter: It specifies an integer corresponding to one of FILTER constants. $blur: It specifies the blur factor where > 1 is blurry, < 1 is sharp. $best_fit (Optional): It specifies the fit parameter. $legacy (Optional): It specifies the legacy. Return Value: This function returns TRUE on success. Exceptions: This function throws ImagickException on error. Below given programs illustrate the Imagick::resizeImage() 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'); // Resize the image $imagick->resizeImage( 620, 300, Imagick::FILTER_LANCZOS, 1); // Display the image header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Program 2: php <?php // Create a new Imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Resize the image $imagick->resizeImage( 520, 200, imagick::FILTER_GAUSSIAN, 10); // Display the image header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagick.resizeimage.php Comment More infoAdvertise with us Next Article PHP | Imagick resizeImage() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Gmagick resizeimage() Function The Gmagick::resizeimage() function is an inbuilt function in PHP which is used to scale an image in given dimensions with a filter.Syntax:  Gmagick Gmagick::resizeimage( $width, $height, $filter, $blur) Parameters: This function accepts four parameters as mentioned above and described below:  $wi 2 min read PHP | Imagick writeImage() Function The Imagick::writeImage() function is an inbuilt function in PHP which is used to write an image to the specified filename. This function saves the image file in the same folder where your PHP script is located. Syntax: bool Imagick::writeImage( string $filename = NULL ) Parameters: This function ac 1 min read PHP | Imagick resampleImage() Function The Imagick::resampleImage() function is an inbuilt function in PHP which is used to resample the image to the desired resolution Syntax: bool Imagick::resampleImage( $x_resolution, $y_resolution, $filter, $blur ) Parameters: This function accepts four parameters as mentioned above and described bel 1 min read PHP | Imagick previewImages() Function The Imagick::previewImages() function is an inbuilt function in PHP which is used to quickly pin-point appropriate parameters for image processing. It tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths. Syntax: bool Imagick::previewImages( int 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 Like