PHP | Imagick previewImages() Function Last Updated : 16 Jun, 2022 Comments Improve Suggest changes 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 V VigneshKannan3 Follow 0 Improve V VigneshKannan3 Follow 0 Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Explore PHP Tutorial 8 min read BasicsPHP Syntax 4 min read PHP Variables 5 min read PHP | Functions 8 min read PHP Loops 4 min read ArrayPHP Arrays 5 min read PHP Associative Arrays 4 min read Multidimensional arrays in PHP 5 min read Sorting Arrays in PHP 4 min read OOPs & InterfacesPHP Classes 2 min read PHP | Constructors and Destructors 5 min read PHP Access Modifiers 4 min read Multiple Inheritance in PHP 4 min read MySQL DatabasePHP | MySQL Database Introduction 4 min read PHP Database connection 2 min read PHP | MySQL ( Creating Database ) 3 min read PHP | MySQL ( Creating Table ) 3 min read PHP AdvancePHP Superglobals 6 min read PHP | Regular Expressions 12 min read PHP Form Handling 4 min read PHP File Handling 4 min read PHP | Uploading File 3 min read PHP Cookies 9 min read PHP | Sessions 7 min read Like