PHP | Imagick previewImages() Function Last Updated : 16 Jun, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report The Imagick::previewImages() function is an inbuilt function in PHP which is used to quickly pin-point appropriate parameters for image processing. It tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths. Syntax: bool Imagick::previewImages( int $preview ) Parameters: This function accepts single parameter $preview which holds the preview type constants. Click here to get the list of preview type constants. Return Value: This function returns TRUE on success and FALSE on Error or Failure. Errors/Exceptions: It throws ImagickException while error occurred. Below program illustrates the Imagick::previewImages() function in PHP: Program: php <?php // Store the image source into variable $imagePath = "https://cdncontribute.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png"; // Create new Imagick object $imagick = new \Imagick($imagePath); // Use previewImages() function $imagick->previewImages(imagick::PREVIEW_EDGEDETECT); header("Content-Type: image/png"); // Display output image echo $imagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagick.previewimages.php Comment More infoAdvertise with us Next Article PHP | Imagick previousImage() Function V VigneshKannan3 Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick previousImage() Function The Imagick::previousImage() function is an inbuilt function in PHP which is used to move to the previous image within the Imagick instance. An Imagick instance may consist of a list of images within it and Imagick previousImage() moves the pointer/cursor to the previous image in the image list with 2 min read PHP | Imagick removeImage() Function The Imagick::removeImage() function is an inbuilt function in PHP which is used to remove an image from the image list. This function removes the current image which is pointed by the cursor. Syntax: bool Imagick::removeImage( void ) Parameters: This function doesnât accepts any parameters. Return V 1 min read PHP | Imagick resizeImage() Function The Imagick::resizeImage() function is an inbuilt function in PHP which is used to scale an image to the desired dimensions. Syntax: bool Imagick::resizeImage( int $columns, int $rows, int $filter, float $blur, bool $best_fit = false, bool $legacy = false ) Parameters: This function accepts six para 2 min read PHP | Imagick readImages() Function The Imagick::readImages() function is an inbuilt function in PHP which is used to read images from an array of filenames and associate them to a single Imagick object. Syntax: bool Imagick::readImages( array $filenames ) Parameters:This function accepts a single parameter $filenames which holds an a 2 min read PHP | Imagick writeImage() Function The Imagick::writeImage() function is an inbuilt function in PHP which is used to write an image to the specified filename. This function saves the image file in the same folder where your PHP script is located. Syntax: bool Imagick::writeImage( string $filename = NULL ) Parameters: This function ac 1 min read PHP | Imagick readImage() Function The Imagick::readImage() function is an inbuilt function in PHP which is used to read an image from filename. Syntax: bool Imagick::readImage( string $filename ) Parameters:This function accepts a single parameter $filename which holds the name of the file. It can also accept URL of the file. Return 1 min read Like