コード例 #1
0
ファイル: lib-image.php プロジェクト: NewRoute/glfusion
function UTL_execWrapper($cmd)
{
    list($results, $status) = UTL_exec($cmd);
    if ($status == 0) {
        return true;
    } else {
        COM_errorLog("UTL_execWrapper: Failed Command: " . $cmd);
        return false;
    }
}
コード例 #2
0
ファイル: im_image.php プロジェクト: spacequad/glfusion
function _img_getIMversion()
{
    global $_CONF;
    $version = '';
    // get im version
    list($results, $status) = UTL_exec($_CONF['path_to_mogrify'] . '/identify');
    foreach ($results as $resultLine) {
        if (preg_match('/(ImageMagick|GraphicsMagick)\\s+([\\d\\.r-]+)/', $resultLine, $matches)) {
            $version = array($matches[1], $matches[2]);
        }
    }
    return $version;
}
コード例 #3
0
ファイル: im_image.php プロジェクト: mistgrass/geeklog-ivywe
function _img_getIMversion()
{
    global $_CONF, $_MG_CONF;
    // get im version
    $binary = 'identify' . (PHP_OS == 'WINNT' ? '.exe' : '');
    $cmd = $_MG_CONF['path_to_imagemagick'] . $binary;
    list($results, $status) = UTL_exec($cmd);
    if ($status != 0) {
        COM_errorLog("UTL_execWrapper: Failed Command: " . $cmd);
        return false;
    }
    foreach ($results as $resultLine) {
        if (preg_match('/(ImageMagick|GraphicsMagick)\\s+([\\d\\.r-]+)/', $resultLine, $matches)) {
            $version = array($matches[1], $matches[2]);
        }
    }
    return $version;
}