Add Rasmus' hint to use ImageType()

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@34121 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Martin Kraemer 2000-10-19 12:45:25 +00:00
parent 9b53d281d7
commit 85c283be53

View file

@ -1067,15 +1067,15 @@ function LoadPNG ($imgname) {
<informalexample>
<programlisting role="php">
&lt;?php
if(function_exists("imagegif")) {
if (function_exists("imagegif")) {
Header("Content-type: image/gif");
ImageGif($im);
}
elseif(function_exists("imageJpeg")) {
elseif (function_exists("imagejpeg")) {
Header("Content-type: image/jpeg");
ImageJpeg($im, "", 0.5);
}
elseif(function_exists("imagePng")) {
elseif (function_exists("imagepng")) {
Header("Content-type: image/png");
ImagePng($im);
}
@ -1086,6 +1086,27 @@ function LoadPNG ($imgname) {
</informalexample>
</para>
</note>
<note>
<para>
In PHP4 as of version 4.0.2 you can use the function
<function>imagetypes</function> in place of
<function>function_exists</function> for checking
the presence of the various supported image formats:
<informalexample>
<programlisting role="php">
if (ImageTypes() &amp; IMG_GIF) {
Header("Content-type: image/gif");
ImageGif($im);
}
elseif (ImageTypes() &amp; IMG_JPG) {
... etc.</programlisting>
</informalexample>
</para>
</note>
</para>
<para>
See also <function>ImagePng</function>,
<function>ImageJpeg</function>, <function>ImageTypes</function>.
</para>
</refsect1>
</refentry>
@ -1122,6 +1143,10 @@ ImagePng($im);
</programlisting>
</informalexample>
</para>
<para>
See also <function>ImageGif</function>,
<function>ImageJpeg</function>, <function>ImageTypes</function>.
</para>
</refsect1>
</refentry>
@ -1164,6 +1189,10 @@ ImagePng($im);
</para>
</note>
</para>
<para>
See also <function>ImagePng</function>,
<function>ImageGif</function>, <function>ImageTypes</function>.
</para>
</refsect1>
</refentry>