PHP Imagick resampleImage () function

PHP

Syntax:
bool Imagick::resampleImage ($x_resolution, $y_resolution, $filter, $blur)
Parameters:This function takes four parameters as above and described below:
  • $x_resolution:This parameter stores the x resolution value.
  • $y_resolution:this parameter stores the y resolution.
  • $filter:this parameter stores the filter value.
  • $blur:this parameter stores the value of the blur level.
Return Value:This function returns True on success. 
Original image:
The program below illustrates the function Imagick::resampleImage()in PHP:Program :  
// Create a new Imagick object $imagick = new Imagick ( ` https://media.engineerforengineer.org/wp-content/uploads/engineerforengineer-19.png ` );  
// Use the resampleImage function to resize the image $imagick -> resampleImage (200, 200, Imagick::FILTER_LANCZOS, 1);  
// Image title header ( "Content-Type: image / jpg" );  
// Display the output image echo $imagick -> getImageBlob(); ?>
Output:Link: http://php.net/manual/en/imagick.resampleimage.php



Get Solution for free from DataCamp guru