Page 1 of 1

imagick version

Posted: 2012-09-02T10:39:49-07:00
by tk1
Hi!

I would like to know if there is any way to get Imagick version in PHP. I don't want to get ImageMagick version because I ca use Imagick::getVersion(). One more thing I can't use exec & system functions.

Re: imagick version

Posted: 2012-09-02T10:54:10-07:00
by fmw42
You can get Imagick at http://pecl.php.net/package/imagick/3.1.0RC2. But you also must have Imagemagick as well for it to work. Also not that Imagick has not been keeping up with more current features of Imagemagick. I don't think it is maintained or being developed any further.

Re: imagick version

Posted: 2012-09-02T11:01:43-07:00
by tk1
On my laptop I have Imagick working but I don't know how to get programically version info like phpinfo() shows.

Re: imagick version

Posted: 2012-09-02T11:06:46-07:00
by fmw42
For imagemagick you can use

convert -list version

For Imagick, see http://php.net/manual/en/book.imagick.php and getVersion command

Re: imagick version

Posted: 2012-09-02T11:49:39-07:00
by Bonzo
This returns an array and you need to decide what you need.

Example:

Code: Select all

<?php  
$version = Imagick::getVersion(); 
echo "API version number: ".$version['versionNumber']."<br>"; 
echo "API version string: ".$version['versionString']."<br>"; 
 ?>
I have started to put an example of all Imagick functions on my website.

Re: imagick version

Posted: 2012-09-04T03:54:50-07:00
by tk1
fmw42:
I have to get this info in PHP. Hosting provider doesn't allow on executing exec() & system() functions.

Bonzo:
I tried this function but I get an info about ImageMagick not the Imagick - the PHP extension.

Re: imagick version

Posted: 2012-09-11T11:53:13-07:00
by tk1
I got an answer on my question. In the source code I found two undocumented constant Imagick::IMAGICK_EXTNUM and Imagick::IMAGICK_EXTVER.