PHP | Imagick appendImages() Function Last Updated : 26 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::appendImages() function is an inbuilt function in PHP which is used to append set of images. This function appends a set of images into a single image. Syntax: Imagick::appendImages( $stack ) Parameters: This function accepts a single parameters $stack which is mandatory. If the stack value is false then images stacked from left to right and if the stack value is true then image stacked from top to bottom. The default value of the stack is false. Return Value: This function returns Imagick instance on success. Errors/Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::appendImages() function in PHP: Program 1: php <?php /* Create new imagick object */ $image = new Imagick(); /* create red, green and blue images */ $image->newImage(600, 70, "red"); $image->newImage(600, 70, "white"); $image->newImage(600, 70, "green"); /* Append the images into one */ $image->resetIterator(); $combined = $image->appendImages(true); /* Output the image */ $combined->setImageFormat("png"); header("Content-Type: image/png"); echo $combined; ?> Output: Program 2: php <?php /* Create new imagick object */ $image = new Imagick(); /* create red, green and blue images */ $image->newImage(210, 200, "red"); $image->newImage(210, 200, "white"); $image->newImage(210, 200, "green"); /* Append the images into one */ $image->resetIterator(); $combined = $image->appendImages(false); /* Output the image */ $combined->setImageFormat("png"); header("Content-Type: image/png"); echo $combined; ?> Output: Related Articles: PHP | Imagick adaptiveBlurImage() Function PHP | Imagick adaptiveSharpenImage() Function Reference: http://php.net/manual/en/imagick.appendimages.php Comment More infoAdvertise with us Next Article PHP | Imagick appendImages() Function V vijay_raj Follow Improve Article Tags : Misc Web Technologies PHP Image-Processing PHP-Imagick +1 More Practice Tags : Misc Similar Reads 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 averageImages() Function The Imagick::averageImages() function is an inbuilt function in PHP which is used to create an average of two or more images after image processing. It is well defined in PECL imagick 2.0.0 version. This function has been depreciated in further versions of Imagick hence it is replaced by Imagick::me 2 min read PHP | Gmagick addImage() Function The Gmagick::addImage() function is an inbuilt function in PHP which is used to adds new image to Gmagick object image list. This function adds a new image to Gmagick object from the current position of the source object. The Gmagick class have the ability to hold and operate on multiple images simu 2 min read PHP | Imagick extentImage() Function The Imagick::extentImage() function is an inbuilt function in PHP which provides the method for setting the image size. This method sets the image size and allows to set x, y coordinates where the new area of the image begins. Syntax: bool Imagick::extentImage( $width, $height, $x, $y ) Parameter: T 1 min read Like