PHP | Gmagick getimageinterlacescheme() Function
Last Updated :
21 Jan, 2020
The Gmagick::getimageinterlacescheme() function is an inbuilt function in PHP which is used to get the interlace scheme of the image.
Syntax:
int Gmagick::getimageinterlacescheme( void )
Parameters: This function doesn’t accept any parameters.
Return Value: This function returns an integer value corresponding to one of INTERLACE constants as given below:
- gmagick::INTERLACE_UNDEFINED (0)
- gmagick::INTERLACE_NO (1)
- gmagick::INTERLACE_LINE (2)
- gmagick::INTERLACE_PLANE (3)
- gmagick::INTERLACE_PARTITION (4)
Exceptions: This function throws GmagickException on error.
Below given programs illustrate the Gmagick::getimageinterlacescheme() function in PHP:
Program 1:
<?php
$gmagick = new Gmagick( 'geeksforgeeks.png' );
$interlaceScheme = $gmagick ->getimageinterlacescheme();
echo $interlaceScheme ;
?>
|
Output:
0 // Which is the default value for any Gmagick object.
Program 2:
<?php
$gmagick = new Gmagick( 'geeksforgeeks.png' );
$gmagick ->setimageinterlacescheme(gmagick::INTERLACE_LINE);
$interlaceScheme = $gmagick ->getimageinterlacescheme();
echo $interlaceScheme ;
?>
|
Output:
2 // Which corresponds to gmagick::INTERLACE_LINE.
Reference: https://www.php.net/manual/en/gmagick.getimageinterlacescheme.php
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...