PHP | Imagick displayImages() Function Last Updated : 24 Oct, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::displayImages() function is an inbuilt function in PHP which is used to display an image or images sequence on an X server. Syntax: bool Imagick::displayImages( string $servername ) Parameters: This function accepts single parameter $servername which holds the X server name. Return Value: This function returns True on success. Errors/Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::displayImages() function in PHP: Program 1: php <?php // Create an Imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); // Use displayImage function $imagick->displayImage('servername'); header("Content-Type: image/jpg"); // Display the output image echo $imagick->getImageBlob(); ?> Output: Program 2: php <?php $string = "Computer Science portal for Geeks!"; // Creating new image of above String // and add color and background $im = new Imagick(); $draw = new ImagickDraw(); // Fill the color in image $draw->setFillColor(new ImagickPixel('green')); // Set the text font size $draw->setFontSize(50); $metrix = $im->queryFontMetrics($draw, $string); $draw->annotation(0, 40, $string); $im->newImage($metrix['textWidth'], $metrix['textHeight'], new ImagickPixel('white')); // Draw the image $im->drawImage($draw); // Use displayImage function $im->displayImage('servername'); $im->setImageFormat('png'); header("Content-Type: image/jpg"); // Display the output image echo $im->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagick.displayimages.php Comment More infoAdvertise with us Next Article PHP | Imagick displayImages() Function S skyridetim Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick displayImage() Function The Imagick::displayImage() function is an inbuilt function in PHP which is used to displays an image object. Syntax: bool Imagick::displayImage( $servername ) Parameters: This function accepts a single parameter $servername which is used to specify the server name. Return Value: This function retur 1 min read PHP | Imagick drawImage() Function The Imagick::drawImage() function is an inbuilt function in PHP which is used to render the ImagickDraw object on the Imagick object. It is used to draw the image on the Imagick instance. We set an image matrix, parameters and the borders of the drawn image with the help of ImagickDraw methods and t 2 min read PHP | Imagick addImage() Function The Imagick::addImage() function is an inbuilt function in PHP which is used to adds new image to Imagick object image list. After the operation iterator position is moved at the end of the list. This function adds new image to Imagick object from the current position of the source object. The Imagi 1 min read PHP | Imagick flattenImages() Function The Imagick::flattenImages() function is an inbuilt function in PHP which is used to merges the sequence of images. This is useful for combining Photoshop layers into a single image. Syntax: Imagick Imagick::flattenImages( void ) Parameters: This function does not accept any parameter. Return Value: 1 min read PHP | Imagick decipherImage() Function The Imagick::decipherImage() function is an inbuilt function in PHP which is used to decipher an image which has been enciphered before. Syntax: bool Imagick::decipherImage( string $passphrase ) Parameters: This function accepts a single parameter $passphrase which holds the passphrase value or the 1 min read Like