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 Imagick class have the ability to hold and operate on multiple images simultaneously.
Syntax:
bool Imagick::addImage ( $source )
Parameters: This function accepts single parameter $source which holds the source Imagick object.
Return Value: This function returns TRUE on success.
Errors/Exceptions: This function throws ImagickException on error.
Below programs illustrate the Imagick::addImage() function in PHP:
Original Image 1:

Original Image 2:

Program:
<?php // require_once('path/to/vendor/autoload.php'); header('Content-type: image/png'); $image = new Imagick( $t = new Imagick( $image->addImage($t); echo $image; ?> |
Related Articles:
Reference: http://php.net/manual/en/imagick.addimage.php
Recommended Posts:
- PHP | Gmagick addImage() Function
- PHP | Imagick getImageColorspace() Function
- PHP | Imagick getImageGamma() Function
- PHP | Imagick flipImage() Function
- PHP | Imagick brightnessContrastImage() Function
- PHP | Imagick flopImage() Function
- PHP | Imagick chopImage() Function
- PHP | Imagick getImageColors() Function
- PHP | Imagick smushImages() function
- PHP | Imagick tintImage() Function
- PHP | Imagick vignetteImage() Function
- PHP | Imagick shadeImage() Function
- PHP | Imagick functionImage() Function
- PHP | Imagick drawImage() Function
- PHP | Imagick solarizeImage() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



