php-doc-en/reference/gmagick/examples.xml
Christoph Michael Becker 0e4770f0b1 Use canonical method name in examples
Patch provided by Nicolas CARPi.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347808 c90b9560-bf6c-de11-be94-00142212c4b1
2019-07-27 11:30:19 +00:00

52 lines
1.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="gmagick.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
<para>
The following shows some common Gmagick image operations.
</para>
<example>
<title>Gmagick Example</title>
<programlisting role="php">
<![CDATA[
<?php
//Instantiate a new Gmagick object
$image = new Gmagick('example.jpg');
//Make thumbnail from image loaded. 0 for either axes preserves aspect ratio
$image->thumbnailimage(100, 0);
//Create a border around the image, then simulate how the image will look like as an oil painting
//Notice the chaining of mutator methods which is supported in gmagick
$image->borderimage("yellow", 8, 8)->oilpaintimage(0.3);
//Write the current image at the current state to a file
$image->write('example_thumbnail.jpg');
?>
]]>
</programlisting>
</example>
</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:"~/.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
-->