<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.thumbnailimage">
 <refnamediv>
  <refname>Imagick::thumbnailImage</refname>
  <refpurpose>Changes the size of an image</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <type>bool</type><methodname>Imagick::thumbnailImage</methodname>
   <methodparam><type>int</type><parameter>columns</parameter></methodparam>
   <methodparam><type>int</type><parameter>rows</parameter></methodparam>
   <methodparam choice="opt"><type>bool</type><parameter>bestfit</parameter><initializer>&false;</initializer></methodparam>
   <methodparam choice="opt"><type>bool</type><parameter>fill</parameter><initializer>&false;</initializer></methodparam>
   <methodparam choice="opt"><type>bool</type><parameter>legacy</parameter><initializer>&false;</initializer></methodparam>
  </methodsynopsis>
  <para>
   Changes the size of an image to the given dimensions and removes any
   associated profiles. The goal is to produce small, low cost thumbnail
   images suited for display on the Web. 

   If &true; is given as a third parameter then columns and rows parameters
   are used as maximums for each side. Both sides will be scaled down until
   they match or are smaller than the parameter given for the side.
  </para>
  &imagick.bestfit.note;
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>columns</parameter></term>
     <listitem>
      <para>
      Image width
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>rows</parameter></term>
     <listitem>
      <para>
      Image height
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>bestfit</parameter></term>
     <listitem>
      <para>
      Whether to force maximum values
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &imagick.return.success;
  </para>
 </refsect1>

 <refsect1 role="errors">
  &reftitle.errors;
  <para>
   &imagick.imagick.throws;
  </para>
 </refsect1>



 <refsect1 role="examples">
  &reftitle.examples;
  <para>
    <example>
      <title> <function>Imagick::thumbnailImage</function></title>
      <programlisting role="php">
      <![CDATA[
<?php
function thumbnailImage($imagePath) {
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->setbackgroundcolor('rgb(64, 64, 64)');
    $imagick->thumbnailImage(100, 100, true, true);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}

?>
]]>
      </programlisting>
    </example>
  </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
-->
