PHP | Imagick setImage() Function
Last Updated :
15 Nov, 2019
The Imagick::setImage() function is an inbuilt function in PHP which is used to replace an image in the object.
Syntax:
bool Imagick::setImage( Imagick $replace )
Parameters: This function accepts single parameter $replace which holds an Imagick object.
Return Value: This function returns TRUE on success.
Exceptions: This function throws ImagickException on error.
Below program illustrates the Imagick::setImage() function in PHP:
Program:
<?php
$imagick_source = new Imagick(
$imagick_replace = new Imagick(
$imagick_source ->setImage( $imagick_replace );
header( 'Content-type: image/jpeg' );
echo $imagick_source ;
?>
|
Output:
Reference: https://www.php.net/manual/en/imagick.setimage.php
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...