本文整理汇总了PHP中phpThumb::ImageMagickCommandlineBase方法的典型用法代码示例。如果您正苦于以下问题:PHP phpThumb::ImageMagickCommandlineBase方法的具体用法?PHP phpThumb::ImageMagickCommandlineBase怎么用?PHP phpThumb::ImageMagickCommandlineBase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phpThumb
的用法示例。
在下文中一共展示了phpThumb::ImageMagickCommandlineBase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
echo 'olive';
}
} elseif (!empty($ServerInfo['gd_string'])) {
echo 'orange';
} else {
echo 'red';
}
echo ';">';
echo '<div style="color: navy; font-family: monospace;">' . htmlentities($phpThumb->config_imagemagick_path);
echo ' <span style="cursor: help;" title="file_exists" >[' . intval(@file_exists($phpThumb->config_imagemagick_path)) . ']</span> ';
echo ' <span style="cursor: help;" title="file_exists_ignoreopenbasedir">[' . intval($phpThumb->file_exists_ignoreopenbasedir($phpThumb->config_imagemagick_path)) . ']</span> ';
echo ' <span style="cursor: help;" title="is_file" >[' . intval(@is_file($phpThumb->config_imagemagick_path)) . ']</span> ';
echo ' <span style="cursor: help;" title="is_readable" >[' . intval(@is_readable($phpThumb->config_imagemagick_path)) . ']</span> ';
echo ' <span style="cursor: help;" title="is_executable" >[' . intval(@is_executable($phpThumb->config_imagemagick_path)) . ']</span> ';
echo '</div>';
echo '<div style="color: blue; font-family: monospace;">' . htmlentities($phpThumb->ImageMagickCommandlineBase()) . '</div>';
echo $ServerInfo['im_version'] ? $ServerInfo['im_version'] : 'n/a';
echo $IMreleaseDate ? '<br><br>This version of ImageMagick is ' . NiceTimeFormatting($IMversionAge) . ' old<br>(see <a href="http://www.imagemagick.org/">www.imagemagick.org</a> for new versions)' : '';
echo '</th><td>ImageMagick is faster than GD, can process larger images without PHP memory_limit issues, can resize animated GIFs. phpThumb can perform most operations with ImageMagick only, even if GD is not available.</td></tr>';
echo '<tr><th>ImageMagick features:</th>';
if ($ServerInfo['im_version']) {
$GDfeatures['red'] = array('help', 'thumbnail', 'resize', 'crop', 'repage', 'coalesce', 'gravity', 'background', 'interlace', 'flatten', 'border', 'bordercolor', 'dither', 'quality');
$GDfeatures['orange'] = array('version', 'blur', 'colorize', 'colors', 'colorspace', 'contrast', 'contrast-stretch', 'edge', 'emboss', 'fill', 'flip', 'flop', 'gamma', array('gaussian', 'gaussian-blur'), 'level', 'modulate', 'monochrome', 'negate', 'normalize', 'rotate', 'sepia-tone', 'threshold', 'unsharp');
echo '<th colspan="2">|';
foreach ($GDfeatures as $missingcolor => $features) {
foreach ($features as $dummy => $feature) {
$foundOneThatWorks = false;
if (is_array($feature)) {
// sometimes feature names change, e.g. "gaussian" -> "gaussian-blur". They won't both exist in the same version of ImageMagick, but as long as one of them does then the feature will work
foreach ($feature as $alternate_feature_name) {
if ($phpThumb->ImageMagickSwitchAvailable($alternate_feature_name)) {
示例2: htmlentities
echo 'lime';
} elseif ($IMversionAge < 365 * 2) {
echo 'lightgreen';
} elseif ($IMversionAge < 365 * 3) {
echo 'green';
} elseif ($IMversionAge < 365 * 4) {
echo 'darkgreen';
} else {
echo 'olive';
}
} elseif (@$ServerInfo['gd_string']) {
echo 'orange';
} else {
echo 'red';
}
echo '">"' . $phpThumb->ImageMagickCommandlineBase() . '"<br>' . ($ServerInfo['im_version'] ? $ServerInfo['im_version'] : 'n/a') . (@$IMversionAge ? '<br><br>This version of ImageMagick is ' . ($IMversionAge < 180 ? number_format($IMversionAge / 30, 2) . ' months' : number_format($IMversionAge / 365, 2) . ' years') . ' old<br>(see www.imagemagick.org for new versions)' : '');
echo '</th><td>ImageMagick is faster than GD, can process larger images without PHP memory_limit issues, can resize animated GIFs. phpThumb can perform most operations with ImageMagick only, even if GD is not available.</td></tr>';
echo '<tr><th>ImageMagick features:</th><th colspan="2">|';
$GDfeatures['red'] = array('help', 'thumbnail', 'resize', 'crop', 'repage', 'coalesce', 'gravity', 'background', 'interlace', 'flatten', 'border', 'bordercolor', 'dither', 'quality');
$GDfeatures['orange'] = array('version', 'blur', 'colorize', 'colors', 'colorspace', 'contrast', 'contrast-stretch', 'edge', 'emboss', 'fill', 'flip', 'flop', 'gamma', 'gaussian', 'level', 'modulate', 'monochrome', 'negate', 'normalize', 'rotate', 'sepia-tone', 'threshold', 'unsharp');
foreach ($GDfeatures as $missingcolor => $features) {
foreach ($features as $dummy => $feature) {
echo '| <span style="background-color: ' . ($phpThumb->ImageMagickSwitchAvailable($feature) ? 'lime' : $missingcolor) . ';">' . htmlentities($feature) . '</span> |';
}
}
echo '|</th><td>All of these parameters may be called by phpThumb, depending on parameters used. Green means the feature is available; red means a critical feature is missing; orange means an optional filter/feature is missing.</td></tr>';
echo '<tr><th>ImageMagick formats:</th><th colspan="2"><textarea rows="10" cols="50" wrap="off">';
echo htmlentities($phpThumb->ImageMagickFormatsList());
echo '</textarea></th><td>ImageMagick can only read/write formats as listed here. You may need to recompile ImageMagick if you need to use a format not listed</td></tr>';
echo '<tr><th>GD features:</th><th colspan="2">';
$GDfeatures['red'] = array('JPG Support', 'PNG Support');
示例3: elseif
} elseif ($ServerInfo['im_version']) {
echo 'orange';
} else {
echo 'red';
}
echo '">' . @$ServerInfo['gd_string'];
echo '</th><td>GD2-bundled version is ideal.<br>GD2 (non-bundled) is second choice, but there are a number of bugs in the non-bundled version. ImageRotate is only available in the bundled version of GD2.<br>GD1 will also (mostly) work, at much-reduced image quality and several features disabled. phpThumb can perform most operations with ImageMagick only, even if GD is not available.</td></tr>';
echo '<tr><th>ImageMagick version:</th><th colspan="2" bgcolor="';
if ($ServerInfo['im_version']) {
echo 'lime';
} elseif (@$ServerInfo['gd_string']) {
echo 'orange';
} else {
echo 'red';
}
echo '">"' . $phpThumb->ImageMagickCommandlineBase() . '"<br>' . ($ServerInfo['im_version'] ? $ServerInfo['im_version'] : 'n/a');
echo '</th><td>ImageMagick is faster than GD, can process larger images without PHP memory_limit issues, can resize animated GIFs. phpThumb can perform most operations with ImageMagick only, even if GD is not available.</td></tr>';
echo '<tr><th>ImageMagick features:</th><th colspan="2">';
$GDfeatures['red'] = array('version', 'help', 'thumbnail', 'crop', 'repage', 'coalesce', 'gravity', 'background', 'interlace', 'flatten', 'border', 'bordercolor', 'dither', 'quality');
$GDfeatures['orange'] = array('blur', 'colorize', 'colors', 'colorspace', 'contrast', 'edge', 'emboss', 'fill', 'flip', 'flop', 'gamma', 'gaussian', 'level', 'modulate', 'monochrome', 'negate', 'normalize', 'sepia-tone', 'threshold', 'unsharp');
foreach ($GDfeatures as $missingcolor => $features) {
foreach ($features as $dummy => $feature) {
echo ' <span style="background-color: ' . ($phpThumb->ImageMagickSwitchAvailable($feature) ? 'lime' : $missingcolor) . ';">' . htmlentities($feature) . ' | </span>';
}
}
echo '</th><td>All of these parameters may be called by phpThumb, depending on parameters used. Green means the feature is available; red means a critical feature is missing; orange means an optional filter/feature is missing.</td></tr>';
echo '<tr><th>GD features:</th><th colspan="2">';
$GDfeatures['red'] = array('JPG Support', 'PNG Support');
$GDfeatures['orange'] = array('GIF Read Support', 'GIF Create Support', 'FreeType Support');
foreach ($GDfeatures as $missingcolor => $features) {
foreach ($features as $dummy => $feature) {