PHP | Imagick adaptiveResizeImage() Function
The Imagick::adaptiveResizeImage() function is an inbuilt function in PHP which provides an adaptively resize image feature to the image. The intensity of an adaptive resize image depends on dramatically decreased at the edge of the image. This function is used to resize the image according to web sites. It is useful when it shrinks the images slightly to a slightly smaller “web size” may not look good when a full-sized image is adaptively resized to a thumbnail.
bool Imagick::adaptiveResizeImage ( $columns, $rows, $bestfit )
Parameters: This function accepts three parameters as mentioned above and described below:
- $columns: This parameter is used to set the number of column in scaled image.
- $rows: This parameter is used to set the number of rows in scaled image.
- $bestfit: This parameter is used to check whether fit the image inside bounding box.
Return Value: This function returns TRUE on success.
Errors/Exceptions: This function throws ImagickException on error.
Below programs illustrate the Imagick::adaptiveResizeImage() function in PHP:
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!