bool Imagick::adaptiveResizeImage ($columns, $rows, $bestfit)Parameters:this function takes three parameters as above and described below:
- $columns:this parameter is used to set the column number in the scaled image .
- $lines:this parameter is used to set the number of lines in the scaled image.
- $bestfit:this parameter is used for checks if the image is within the bounding box.
Program :
php
// require_once (’ path / to / vendor / autoload.php ’);
header (
’Content-type: image / png’
);
$image
=
new
Imagick (
’ https://media.engineerforengineer.org/ wp-content / uploads / engineerforengineer-9.png ’
);
$image
-> adaptiveResizeImage (1024, 768);
echo
$image
;
?>
Output: Link: http://php.net/manual/en/imagick.adaptiveresizeimage.php