cvs: phpdoc /en/features images.xml
| From: | Hartmut Holzgraefe | Date: | Tue, 09 Jan 2001 12:38:23 +0000 |
| Subject: | cvs: phpdoc /en/features images.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969333512@lists.php.net to get a copy of this message | ||
hholzgra Tue Jan 9 04:38:23 2001 EDT
Modified files:
/phpdoc/en/features images.xml
Log:
reverted last changes
Index: phpdoc/en/features/images.xml
diff -u /dev/null phpdoc/en/features/images.xml:1.8
--- /dev/null Tue Jan 9 04:38:23 2001
+++ phpdoc/en/features/images.xml Tue Jan 9 04:38:23 2001
@@ -0,0 +1,59 @@
+ <chapter id="features.images">
+ <title>Creating and manipulating images</title>
+
+ <simpara>
+ PHP is not limited to creating just HTML output. It can also be
+ used to create and manipulate image files in a variety of different
+ image formats, including gif, png, jpg, wbmp, and xpm. Even more
+ convenient, php can output image streams directly to a browser. You
+ will need to compile PHP with the GD library of image functions for
+ this to work. GD and PHP may also require other libraries, depending
+ on which image formats you want to work with. GD stopped supporting
+ Gif images in version 1.6.
+ </simpara>
+
+ <para>
+ <example>
+ <title>PNG creation with PHP</title>
+ <programlisting role="php">
+<?php
+ Header("Content-type: image/png");
+ $string=implode($argv," ");
+ $im = imageCreateFromPng("images/button1.png");
+ $orange = ImageColorAllocate($im, 220, 210, 60);
+ $px = (imagesx($im)-7.5*strlen($string))/2;
+ ImageString($im,3,$px,9,$string,$orange);
+ ImagePng($im);
+ ImageDestroy($im);
+?>
+ </programlisting>
+ </example>
+
+ This example would be called from a page with a tag like: <img
+ src="button.php?text"> The above button.php script
+ then takes this "text" string an overlays it on top of a
+ base image which in this case is "images/button1.png"
+ and outputs the resulting image. This is a very convenient way to
+ avoid having to draw new button images every time you want to
+ change the text of a button. With this method they are
+ dynamically generated.
+ </para>
+
+ </chapter>
+
+<!-- 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
+sgml-parent-document:nil
+sgml-default-dtd-file:"../manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->