<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- Purpose: utilspec.image -->
<!-- Membership: pecl, external -->
<!-- State: experimental -->
<reference id="ref.imagick">
 <title>Imagick Image Library</title>
 <titleabbrev>Imagick Image Library</titleabbrev>

 <partintro>
  <section id="imagick.intro">
   &reftitle.intro;
   <para>
    &warn.experimental;
    Imagick is a native php extension to create and modify images using the
    ImageMagick API.
   </para>
  </section>
 
  <section id="imagick.examples">
   &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 resizeImage to maintain aspect ratio
    $image->resizeImage(1024,0);

}

$images->writeImages();

?>
]]>
     </programlisting>
    </example>
   </para>
  </section>
 </partintro>
 &reference.imagick.constants;
 &reference.imagick.install;
 &reference.imagick.imagick;
 &reference.imagick.imagickdraw;
 &reference.imagick.imagickpixel;
 &reference.imagick.imagickpixeliterator;
</reference>

<!-- 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
-->