cvs: phpdoc /en/reference/imagick book.xml constants.xml examples.xml install.xml setup.xml

From: Date: Sun, 23 Dec 2007 20:12:42 +0000
Subject: cvs: phpdoc /en/reference/imagick book.xml constants.xml examples.xml install.xml setup.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-767@lists.php.net to get a copy of this message
bjori Sun Dec 23 20:12:42 2007 UTC Removed files: /phpdoc/en/reference/imagick install.xml Modified files: /phpdoc/en/reference/imagick book.xml examples.xml setup.xml constants.xml Log: MFB: Upgrade to the new-reference-structure - (Created missing setup sections in setup.xml, if any) - Moved the intro to book.xml - NOTE: Moved the about section to the intro, too - Changed the intro ID from <extname>.intro to intro.<extname> - Moved the constants entity to book.xml - Changed constants.xml to be an appendix - Created an example chapter (examples.xml) NOTE: The chapter ID is imagick.examples, the first example is imagick.examples-1 NOTE: Removed reference.xml (no longer needed)

http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/imagick/book.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/imagick/book.xml diff -u /dev/null phpdoc/en/reference/imagick/book.xml:1.2 --- /dev/null Sun Dec 23 20:12:42 2007 +++ phpdoc/en/reference/imagick/book.xml Sun Dec 23 20:12:42 2007 @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.2 $ --> +<!-- Purpose: utilspec.image --> +<!-- Membership: pecl, external --> +<!-- State: experimental --> + +<book xml:id="book.imagick" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>Imagick Image Library</title> + <titleabbrev>Imagick Image Library</titleabbrev> + + <!-- {{{ preface --> + <preface xml:id="intro.imagick"> + &reftitle.intro; + <para> + &warn.experimental; + Imagick is a native php extension to create and modify images using the + ImageMagick API. + </para> +<!-- {{{ About Imagick --> + <section xml:id="imagick.aboutimagemagick"> + <para> + ImageMagick® is a software suite to create, edit, and compose bitmap images.. + It can read, convert and write images in a variety of formats (over 100) + including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. + </para> + <para> + Copyright 1999-2007 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available. + </para> + </section> +<!-- }}} --> + + </preface> + <!-- }}} --> + + &reference.imagick.setup; + &reference.imagick.constants; + &reference.imagick.examples; + + &reference.imagick.imagick; + &reference.imagick.imagickdraw; + &reference.imagick.imagickpixel; + &reference.imagick.imagickpixeliterator; + +</book> + +<!-- 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:"../../../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 +--> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/imagick/examples.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/imagick/examples.xml diff -u /dev/null phpdoc/en/reference/imagick/examples.xml:1.2 --- /dev/null Sun Dec 23 20:12:42 2007 +++ phpdoc/en/reference/imagick/examples.xml Sun Dec 23 20:12:42 2007 @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.2 $ --> + +<chapter xml:id="imagick.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + &reftitle.examples; + <section xml:id="imagick.examples-1"> + &reftitle.examples; + <para> + Imagick makes image manipulation in PHP extremely easy through an OO + interface. Here is a quick example on how to make a thumbnail: + <example> + <title>Creating a thumbnail in Imagick</title> + <programlisting role="php"> +<![CDATA[ +<?php + +header('Content-type: image/jpeg'); + +$image = new Imagick('image.jpg'); + +// If 0 is provided as a width or height parameter, +// aspect ratio is maintained +$image->thumbnailImage(100, 0); + +echo $image; + +?> +]]> + </programlisting> + </example> + </para> + + <para> + Using SPL and other OO features supported in Imagick, it can be simple + to resize all files in a directory (useful for batch resizing large + digital camera images to be web viewable). Here we use resize, as we might + want to retain certain meta-data: + <example> + <title>Make a thumbnail of all JPG files in a directory</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$images = new Imagick(glob('images/*.JPG')); + +foreach($images as $image) { + + // Providing 0 forces thumbnailImage to maintain aspect ratio + $image->thumbnailImage(1024,0); + +} + +$images->writeImages(); + +?> +]]> + </programlisting> + </example> + </para> + <para> + This is an example of creating a reflection of an image. + The reflection is created by flipping the image and overlaying a gradient on it. + Then both, the original image and the reflection is overlayed on a canvas. + <example> + <title>Creating a reflection of an image</title> + <programlisting role="php"> +<![CDATA[ +<?php +/* Read the image */ +$im = new Imagick("test.png"); + +/* Thumbnail the image */ +$im->thumbnailImage(200, null); + +/* Create a border for the image */ +$im->borderImage(new ImagickPixel("white"), 5, 5); + +/* Clone the image and flip it */ +$reflection = $im->clone(); +$reflection->flipImage(); + +/* Create gradient. It will be overlayd on the reflection */ +$gradient = new Imagick(); + +/* Gradient needs to be large enough for the image and the borders */ +$gradient->newPseudoImage($reflection->getImageWidth() + 10, $reflection->getImageHeight() + 10, "gradient:transparent-black"); + +/* Composite the gradient on the reflection */ +$reflection->compositeImage($gradient, imagick::COMPOSITE_OVER, 0, 0); + +/* Add some opacity. Requires ImageMagick 6.2.9 or later */ +$reflection->setImageOpacity( 0.3 ); + +/* Create an empty canvas */ +$canvas = new Imagick(); + +/* Canvas needs to be large enough to hold the both images */ +$width = $im->getImageWidth() + 40; +$height = ($im->getImageHeight() * 2) + 30; +$canvas->newImage($width, $height, new ImagickPixel("black")); +$canvas->setImageFormat("png"); + +/* Composite the original image and the reflection on the canvas */ +$canvas->compositeImage($im, imagick::COMPOSITE_OVER, 20, 10); +$canvas->compositeImage($reflection, imagick::COMPOSITE_OVER, 20, $im->getImageHeight() + 10); + +/* Output the image*/ +header("Content-Type: image/png"); +echo $canvas; +?> +]]> + </programlisting> + </example> + </para> + </section> +</chapter> + + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/imagick/setup.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/en/reference/imagick/setup.xml diff -u /dev/null phpdoc/en/reference/imagick/setup.xml:1.2 --- /dev/null Sun Dec 23 20:12:42 2007 +++ phpdoc/en/reference/imagick/setup.xml Sun Dec 23 20:12:42 2007 @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.2 $ --> + +<chapter xml:id="imagick.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + &reftitle.setup; + + <!-- {{{ Requirements --> + <section xml:id="imagick.requirements"> + &reftitle.required; + <section xml:id="imagick.requirements.windows"> + <title>Installation requirements on Windows</title> + <para> + Version information does not differ from that above. There are binaries + available from &url.imagemagick; + so that you can load this extension on <emphasis>Windows</emphasis> + without need for a compiler. + </para> + </section> + + <section xml:id="imagick.requirements.nix"> + <title>Installation requirements on other platforms</title> + <para> + PHP &gt;= 5.1.3 and ImageMagick &gt;= 6.2.4 is required. The amount of + formats supported is by Imagick is entirely dependent upon the amount + of formats supported by your ImageMagick installation. For example, + Imagemagick requires ghostscript to conduct PDF operations. + </para> + </section> + </section> + <!-- }}} --> + + <!-- {{{ Installation --> + <section xml:id="imagick.installation"> + &reftitle.install; + <para> + &pecl.moved; + </para> + <para> + &pecl.info; + <link xlink:href="&url.pecl.package;imagick">&url.pecl.package;imagick</link>. + </para> + <note> + <simpara>The official name of this extension is <emphasis>imagick</emphasis>.</simpara> + </note> + <para> + &pecl.windows.download; + </para> + </section> + <!-- }}} --> + + <!-- {{{ Configuration --> + <section xml:id="imagick.configuration"> + &reftitle.runtime; + &no.config; + </section> + <!-- }}} --> + + <!-- {{{ Resources --> + <section xml:id="imagick.resources"> + &reftitle.resources; + &no.resource; + </section> + <!-- }}} --> + +</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 +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"../../../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 +--> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/imagick/constants.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc/en/reference/imagick/constants.xml diff -u phpdoc/en/reference/imagick/constants.xml:1.13 phpdoc/en/reference/imagick/constants.xml:1.14 --- phpdoc/en/reference/imagick/constants.xml:1.13 Sun Oct 7 00:46:47 2007 +++ phpdoc/en/reference/imagick/constants.xml Sun Dec 23 20:12:42 2007 @@ -1,13 +1,8 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.13 $ --> -<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.constants"> - <refnamediv> - <refname>Constants</refname> - <refpurpose>Imagick class constants</refpurpose> - </refnamediv> - <refsect1> - &reftitle.constants; - &extension.constants; +<!-- $Revision: 1.14 $ --> +<appendix xmlns="http://docbook.org/ns/docbook" xml:id="imagick.constants"> + &reftitle.constants; + &extension.constants; <variablelist xml:id="imagick.constants.colortype"> <title>Colortype constants</title> <varlistentry> @@ -3150,8 +3145,7 @@ </listitem> </varlistentry> </variablelist> - </refsect1> -</refentry> +</appendix> <!-- Keep this comment at the end of the file Local variables:
« previous php.doc.cvs (#767) next »