PHP | Gmagick getImageDispose() Function
Last Updated :
28 Aug, 2019
The Gmagick::getImageDispose() function is an inbuilt function in PHP which is used to return the image disposal method.
Syntax:
int Gmagick::getImageDispose( void )
Parameters: This function does not accept any parameter.
Return Value: This function returns the dispose method on success.
Below programs illustrate the Gmagick::getImageDispose() function in PHP:
Original Image 1:
Program 1:
<?php
$gmagick = new Gmagick(
$res = $gmagick ->getImageDispose();
echo ( $res );
?>
|
Output:
0
Original Image 2:
Program 2:
<?php
$string = "Computer Science portal for Geeks!" ;
$im = new Gmagick();
$draw = new GmagickDraw();
$draw ->setFillColor( new GmagickPixel( 'green' ));
$draw ->setFontSize(50);
$metrix = $im ->queryFontMetrics( $draw , $string );
$draw ->annotation(0, 40, $string );
$im ->newImage( $metrix [ 'textWidth' ], $metrix [ 'textHeight' ],
new GmagickPixel( 'white' ));
$im ->drawImage( $draw );
$im ->setImageFormat( 'jpeg' );
$im ->setImageDispose(5);
$res = $im ->getImageDispose();
echo ( $res );
?>
|
Output:
5
Reference: http://php.net/manual/en/gmagick.getimagedispose.php
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...