cvs: phpdoc /en/reference/image/functions getimagesize.xml

From: Date: Mon, 24 May 2004 22:42:55 +0000
Subject: cvs: phpdoc /en/reference/image/functions getimagesize.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969360937@lists.php.net to get a copy of this message
philip Mon May 24 18:42:55 2004 EDT Modified files: /phpdoc/en/reference/image/functions getimagesize.xml Log: Restructured these docs as it was kind of messy (for example the See Also was living within a <note>). Consolidated some version information as well. http://cvs.php.net/diff.php/phpdoc/en/reference/image/functions/getimagesize.xml?r1=1.22&r2=1.23&ty=u Index: phpdoc/en/reference/image/functions/getimagesize.xml diff -u phpdoc/en/reference/image/functions/getimagesize.xml:1.22 phpdoc/en/reference/image/functions/getimagesize.xml:1.23 --- phpdoc/en/reference/image/functions/getimagesize.xml:1.22 Mon Dec 15 11:51:11 2003 +++ phpdoc/en/reference/image/functions/getimagesize.xml Mon May 24 18:42:55 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.22 $ --> +<!-- $Revision: 1.23 $ --> <!-- splitted from ./en/functions/image.xml, last change in rev 1.36 --> <refentry id="function.getimagesize"> <refnamediv> @@ -26,14 +26,37 @@ the file type and a height/width text string to be used inside a normal <acronym>HTML</acronym> <literal>IMG</literal> tag. </para> + <para> + If accessing the <parameter>filename</parameter> image is impossible, + or if it isn't a valid picture, <function>getimagesize</function> + will return &false; and generate an error of level + <varname>E_WARNING</varname>. + </para> <note> <para> Support for <acronym>JPC</acronym>, <acronym>JP2</acronym>, <acronym>JPX</acronym>, <acronym>JB2</acronym>, <acronym>XBM</acronym>, and <acronym>WBMP</acronym> became available in - PHP 4.3.2. Support for <acronym>SWC</acronym> as of PHP 4.3.0. + PHP 4.3.2. Support for <acronym>SWC</acronym> exists as of PHP 4.3.0 + and <acronym>TIFF</acronym> support was added in PHP 4.2.0 </para> </note> + <note> + <simpara> + JPEG 2000 support was added in PHP 4.3.2. Note that JPC and JP2 are + capable of having components with different bit depths. In this case, + the value for "bits" is the highest bit depth encountered. Also, JP2 + files may contain multiple JPEG 2000 codestreams. In this case, + <function>getimagesize</function> returns the values for the first + codestream it encounters in the root of the file. + </simpara> + </note> + <note> + <simpara> + The <function>getimagesize</function> function does not require the GD + image library. + </simpara> + </note> <para> Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 is a @@ -41,7 +64,7 @@ PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF, 15 = WBMP, 16 = XBM. These values correspond to - the IMAGETYPE constants that were added in PHP 4.3. Index 3 is a text + the IMAGETYPE constants that were added in PHP 4.3.0. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag. <example> @@ -57,6 +80,7 @@ </example> </para> <para> + URL support was added in PHP 4.0.5 <example> <title>getimagesize (URL)</title> <programlisting role="php"> @@ -79,7 +103,7 @@ pictures. <literal>bits</literal> is the number of bits for each color. </para> <para> - Beginning with PHP 4.3, <literal>bits</literal> and + Beginning with PHP 4.3.0, <literal>bits</literal> and <literal>channels</literal> are present for other image types, too. However, the presence of these values can be a bit confusing. As an example, <acronym>GIF</acronym> always uses 3 channels per pixel, but the @@ -93,7 +117,7 @@ zero for width and height in these cases. </para> <para> - Beginning with PHP 4.3, <function>getimagesize</function> also returns an + Beginning with PHP 4.3.0, <function>getimagesize</function> also returns an additional parameter, <literal>mime</literal>, that corresponds with the MIME type of the image. This information can be used to deliver images with correct HTTP Content-type headers: @@ -117,11 +141,6 @@ </example> </para> <para> - If accessing the <parameter>filename</parameter> image is impossible, - or if it isn't a valid picture, <function>getimagesize</function> - will return &false; and generate a warning. - </para> - <para> The optional <parameter>imageinfo</parameter> parameter allows you to extract some extended information from the image file. Currently, this will return the different @@ -132,6 +151,8 @@ APP13 marker. You can use the <function>iptcparse</function> function to parse the binary APP13 marker into something readable. + </para> + <para> <example> <title>getimagesize() returning IPTC</title> <programlisting role="php"> @@ -146,32 +167,12 @@ ]]> </programlisting> </example> - <note> - <simpara> - JPEG 2000 support was added in PHP 4.3.2. Note that JPC and JP2 are - capable of having components with different bit depths. In this case, - the value for "bits" is the highest bit depth encountered. Also, JP2 - files may contain multiple JPEG 2000 codestreams. In this case, - <function>getimagesize</function> returns the values for the first - codestream it encounters in the root of the file. - </simpara> - </note> - <note> - <simpara> - TIFF support was added in PHP 4.2. - </simpara> - <simpara> - This function does not require the GD image library. - </simpara> - <simpara> - See also <function>image_type_to_mime_type</function>, - <function>exif_imagetype</function>, <function>exif_read_data</function> - and <function>exif_thumbnail</function>. - </simpara> - <simpara> - URL support was added in PHP 4.0.5. - </simpara> - </note> + </para> + <para> + See also <function>image_type_to_mime_type</function>, + <function>exif_imagetype</function>, + <function>exif_read_data</function> and + <function>exif_thumbnail</function>. </para> </refsect1> </refentry>

« previous php.doc (#969360937) next »