mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Docs for ImageTypes() function
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28323 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c63fbda7ae
commit
03d12a1990
1 changed files with 32 additions and 0 deletions
|
@ -2031,6 +2031,38 @@ ImageDestroy ($im);
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.imagetypes">
|
||||
<refnamediv>
|
||||
<refname>ImageTypes</refname>
|
||||
<refpurpose>
|
||||
Return the image types supported by this PHP build
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>imagettypes</function></funcdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function returns a bit-field corresponding to the image formats
|
||||
supported by the version of GD linked into PHP. The following bits
|
||||
are returned, IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP. To check for PNG
|
||||
support, for example, do this:
|
||||
<example>
|
||||
<title>ImageTypes</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
if(ImageTypes() & IMG_PNG) {
|
||||
echo "PNG Support is enabled";
|
||||
}
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue