imagick version

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
tk1
Posts: 17
Joined: 2011-07-27T05:42:54-07:00
Authentication code: 8675308
Location: Poland

imagick version

Post 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.
cheers
tk1
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: imagick version

Post 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.
tk1
Posts: 17
Joined: 2011-07-27T05:42:54-07:00
Authentication code: 8675308
Location: Poland

Re: imagick version

Post by tk1 »

On my laptop I have Imagick working but I don't know how to get programically version info like phpinfo() shows.
cheers
tk1
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: imagick version

Post by fmw42 »

For imagemagick you can use

convert -list version

For Imagick, see http://php.net/manual/en/book.imagick.php and getVersion command
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: imagick version

Post 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.
tk1
Posts: 17
Joined: 2011-07-27T05:42:54-07:00
Authentication code: 8675308
Location: Poland

Re: imagick version

Post 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.
cheers
tk1
tk1
Posts: 17
Joined: 2011-07-27T05:42:54-07:00
Authentication code: 8675308
Location: Poland

Re: imagick version

Post 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.
cheers
tk1
Post Reply