HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelTutorial Source codeReport an issue


← getPixelRegionIterator   haldClutImage →
Returns the ImageMagick API version as a string and as a number.

Returns information about the version of ImageMagick that is being used.

The 'versionNumber' represents a hex number that encodes the ImageMagick semver version number e.g. 1808 = 0x710, where the ImageMagick major version is 7, minor number is 1, and bug-release is 0.

Version information is:
versionNumber: 1808 
versionString: ImageMagick 7.1.0-57 Q16-HDRI x86_64 d68553b17:20221230 https://imagemagick.org
versionNumber as hex: 710


$version_info = \Imagick::getVersion();
$output = "Version information is:<pre>";
foreach ($version_info as $key => $value) {
    $output .= "$key: $value <br/>";
$output .= sprintf(
    "versionNumber as hex: %x<br/>",
$output .= "</pre>";