static function is_ext_imagick() { global $conf; if (!function_exists('exec')) { return false; } @exec($conf['ext_imagick_dir'] . 'convert -version', $returnarray); if (is_array($returnarray) and !empty($returnarray[0]) and preg_match('/ImageMagick/i', $returnarray[0])) { if (preg_match('/Version: ImageMagick (\\d+\\.\\d+\\.\\d+-?\\d*)/', $returnarray[0], $match)) { self::$ext_imagick_version = $match[1]; } return true; } return false; }