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.
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:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.