cvs: phpdoc /en/functions image.xml

From: Date: Thu, 19 Oct 2000 12:45:25 +0000
Subject: cvs: phpdoc /en/functions image.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969332552@lists.php.net to get a copy of this message
martin Thu Oct 19 05:45:25 2000 EDT Modified files: /phpdoc/en/functions image.xml Log: Add Rasmus' hint to use ImageType() Index: phpdoc/en/functions/image.xml diff -u phpdoc/en/functions/image.xml:1.25 phpdoc/en/functions/image.xml:1.26 --- phpdoc/en/functions/image.xml:1.25 Thu Oct 19 02:23:47 2000 +++ phpdoc/en/functions/image.xml Thu Oct 19 05:45:25 2000 @@ -1067,15 +1067,15 @@ <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,7 +1086,28 @@ </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 @@ </programlisting> </informalexample> </para> + <para> + See also <function>ImageGif</function>, + <function>ImageJpeg</function>, <function>ImageTypes</function>. + </para> </refsect1> </refentry> @@ -1163,6 +1188,10 @@ against GD-1.8 or later. </para> </note> + </para> + <para> + See also <function>ImagePng</function>, + <function>ImageGif</function>, <function>ImageTypes</function>. </para> </refsect1> </refentry>

« previous php.doc (#969332552) next »