Change language

PHP Imagick resizeImage () function

| |
Syntax:
bool Imagick::resizeImage (int $columns, int  $rows, int $filter, float $blur, bool $best_fit = false, bool $legacy = false)
Parameters:This function takes six parameters as above and described below:
  • $columns: specifies the width of the image.
  • $row:specifies the height of the image.
  • $filter:Specifies an integer corresponding to one of the FILTER constants .
  • $blur:sets the blur factor, where > 1 is blurry, < 1 - harsh.
  • $best_fit (optional):specifies a match option.
  • $legacy (optional):specifies legacy.
Return Value:This function returns TRUE on success.Exceptions:This function throws an ImagickException on error .The following programs illustrate the Imagick::resizeImage()function in PHP:Program 1:  
// Create a new Imagick object $imagick = new Imagick ( https://media.engineerforengineer.org/wp-content/uploads/engineerforengineer-13.png );  
// Resize the image $imagick -> resizeImage (620, 300, Imagick::FILTER_LANCZOS, 1);  
// Show image header ( "Content-Type: image / png" ); echo $imagick -> getImageBlob(); ?>
Output: Program 2: < tbody>  
// Create a new Imagick object $imagick = new Imagick ( https://media.engineerforengineer.org/ wp-content / uploads / engineerforengineer-13.png );  
// Resize the image $imagick -> resizeImage (520, 200, imagick::FILTER_GAUSSIAN, 10);  
// Show image header ( "Content-Type: image / png" ); echo $imagick -> getImageBlob(); ?>
Output: Link : https://www.php.net/manual/en/imagick.resizeimage.php
SO 1 data error