svn: /phpdoc/en/trunk/reference/image/ functions/getimagesizefromstring.xml versions.xml

From: Date: Fri, 02 Mar 2012 03:20:50 +0000
Subject: svn: /phpdoc/en/trunk/reference/image/ functions/getimagesizefromstring.xml versions.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9764@lists.php.net to get a copy of this message
philip Fri, 02 Mar 2012 03:20:50 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=323770 Log: Added documentation for getimagesizefromstring() Changed paths: A phpdoc/en/trunk/reference/image/functions/getimagesizefromstring.xml U phpdoc/en/trunk/reference/image/versions.xml Added: phpdoc/en/trunk/reference/image/functions/getimagesizefromstring.xml =================================================================== --- phpdoc/en/trunk/reference/image/functions/getimagesizefromstring.xml (rev 0) +++ phpdoc/en/trunk/reference/image/functions/getimagesizefromstring.xml 2012-03-02 03:20:50 UTC (rev 323770) @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision$ --> + +<refentry xml:id="function.getimagesizefromstring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>getimagesizefromstring</refname> + <refpurpose>Get the size of an image from a string</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>getimagesizefromstring</methodname> + <methodparam><type>string</type><parameter>imagedata</parameter></methodparam> + <methodparam choice="opt"><type>array</type><parameter role="reference">imageinfo</parameter></methodparam> + </methodsynopsis> + <para> + Identical to <function>getimagesize</function> except that <function>getimagesizefromstring</function> + accepts a string instead of a file name as the first parameter. + </para> + <para> + See the <function>getimagesize</function> documentation for details on how this + function works. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <variablelist> + <varlistentry> + <term><parameter>imagedata</parameter></term> + <listitem> + <para> + The image data, as a string. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>imageinfo</parameter></term> + <listitem> + <para> + See <function>getimagesize</function>. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + See <function>getimagesize</function>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>getimagesizefromstring</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$img = '/path/to/test.png'; + +// Open as a file +$size_info1 = getimagesize($img); + +// Or open as a string +$data = file_get_contents($img); +$size_info2 = getimagesizefromstring($data); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>getimagesize</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Modified: phpdoc/en/trunk/reference/image/versions.xml =================================================================== --- phpdoc/en/trunk/reference/image/versions.xml 2012-03-02 03:18:04 UTC (rev 323769) +++ phpdoc/en/trunk/reference/image/versions.xml 2012-03-02 03:20:50 UTC (rev 323770) @@ -6,6 +6,7 @@ <versions> <function name='gd_info' from='PHP 4 &gt;= 4.3.0, PHP 5'/> <function name='getimagesize' from='PHP 4, PHP 5'/> + <function name='getimagesizefromstring' from='PHP 5 &gt;= 5.4.0'/> <function name='image2wbmp' from='PHP 4 &gt;= 4.0.5, PHP 5'/> <function name='image_type_to_extension' from='PHP 5'/> <function name='image_type_to_mime_type' from='PHP 4 &gt;= 4.3.0, PHP 5'/>

« previous php.doc.cvs (#9764) next »