PHP Imagick resampleImage () function


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 ( ` ` );  
// 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(); ?>

Get Solution for free from DataCamp guru