imagetypes
(PHP 4 >= 4.0.2, PHP 5)
imagetypes — 返回当前 PHP 版本所支持的图像类型
<h3>说明</h3>
 int <strong>imagetypes</strong>
  ( void
 )
<p>
 本函数以比特字段方式返回与当前 PHP 版本关联的 GD
 库所支持的图像格式。将返回以下结果,<strong><code>IMG_GIF</code></strong>
 | <strong><code>IMG_JPG</code></strong>
 | <strong><code>IMG_PNG</code></strong>
 | <strong><code>IMG_WBMP</code></strong>| <strong><code>IMG_XPM</code></strong>。
 例如要检查是否支持 PNG,这样做:
  <p><strong>Example #1 <strong>imagetypes()</strong> 例子</strong></p><?php
if (imagetypes() & IMG_PNG) {
echo "PNG Support is enabled";
}
?>
</p>