PHP | Gmagick getversion() Function Last Updated : 29 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Gmagick::getversion() function is an inbuilt function in PHP which is used to return the Gmagick API version. Syntax: array Gmagick::getversion( void ) Parameters: This function does not accept any parameter. Return Value: This function returns the Gmagick API version. Errors/Exceptions: This function throws GmagickException on error. Below programs illustrates the Gmagick::getversion() function in PHP: Program 1: php <?php // Create a Gmagick object $gmagick = new Gmagick( 'https://media.geeksforgeeks.org/wp-content/uploads/tech.png'); // Using getversion() function print_r($gmagick->getversion()); ?> Output: Array ( [versionNumber] => 2168833 [versionString] => GraphicsMagick 1.4 snapshot-20180922 Q16 http://www.GraphicsMagick.org/ ) Program 2: php <?php // Create a GmagickDraw object $draw = new GmagickDraw(); // Create GmagickPixel object $strokeColor = new GmagickPixel('Red'); $fillColor = new GmagickPixel('Green'); // Set the color, opacity of image $draw->setStrokeOpacity(1); $draw->setStrokeColor('Red'); $draw->setFillColor('Green'); // Set the width and height of image $draw->setStrokeWidth(7); $draw->setFontSize(72); // Function to draw circle $draw->circle(250, 250, 100, 150); $gmagick = new Gmagick(); $gmagick->newImage(500, 500, 'White'); $gmagick->setImageFormat("png"); $gmagick->drawImage($draw); // Using getversion() function print_r($gmagick->getversion()); ?> Output: Array ( [versionNumber] => 2168833 [versionString] => GraphicsMagick 1.4 snapshot-20180922 Q16 http://www.GraphicsMagick.org/ ) Reference: http://php.net/manual/en/gmagick.getversion.php Comment More infoAdvertise with us Next Article PHP | Gmagick getversion() Function S sarthak_ishu11 Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Gmagick Similar Reads PHP | Imagick getVersion() Function The Imagick::getVersion() function is an inbuilt function in PHP which is used to get the ImageMagick API version. Syntax: array Imagick::getVersion( void ) Parameters: This function does not accept any parameter. Return Value: This function returns the ImageMagick API version. Below programs illust 1 min read PHP | Gmagick getsize() Function The Gmagick::getsize() function is an inbuilt function in PHP which is used to get the size associated with the Gmagick object. Syntax: array Gmagick::getsize( void ) Parameters: This function doesnât accept any parameter. Return Value: This function returns an associative array containing the keys 1 min read PHP | Gmagick getimageresolution() Function The Gmagick::getimageresolution() function is an inbuilt function in PHP which is used to get the resolution of an image object. Syntax: array Gmagick::getimageresolution( void ) Parameters: This function does not accept any parameter. Return Value: This function returns the resolution as an array. 2 min read PHP | Imagick getCompression() Function The Imagick::getCompression() function is an inbuilt function in PHP which is used to get the object compression type. Syntax: int Imagick::getCompression( void ) Parameters: This function does not accept any parameters. Return Value: This function returns an integer value on success. Below programs 1 min read PHP | Imagick getOption() Function The Imagick::getOption() function is an inbuilt function in PHP which is used to get a value associated with the specified key. Syntax: string Imagick::getOption( string $key ) Parameters: This function accepts a single parameter $key which holds the name of option. Return Value: This function retur 1 min read Like