<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.imagesetinterpolation" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>imagesetinterpolation</refname>
  <refpurpose>Set the interpolation method</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>imagesetinterpolation</methodname>
   <methodparam><type>GdImage</type><parameter>image</parameter></methodparam>
   <methodparam choice="opt"><type>int</type><parameter>method</parameter><initializer><constant>IMG_BILINEAR_FIXED</constant></initializer></methodparam>
  </methodsynopsis>
  <para>
   Sets the interpolation method, setting an interpolation method affects the rendering 
   of various functions in GD, such as the <function>imagerotate</function> function.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    &gd.image.description;
    <varlistentry>
     <term><parameter>method</parameter></term>
     <listitem>
      <para>
       The interpolation method, which can be one of the following:
       <itemizedlist>
        <listitem>
         <simpara>
          <constant>IMG_BELL</constant>: Bell filter.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_BESSEL</constant>: Bessel filter.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_BICUBIC</constant>: Bicubic interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_BICUBIC_FIXED</constant>: Fixed point implementation of the bicubic interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_BILINEAR_FIXED</constant>: Fixed point implementation of the  bilinear interpolation (<literal>default (also on image creation)</literal>).
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_BLACKMAN</constant>: Blackman window function.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_BOX</constant>: Box blur filter.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_BSPLINE</constant>: Spline interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_CATMULLROM</constant>: Cubic Hermite spline interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_GAUSSIAN</constant>: Gaussian function.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_GENERALIZED_CUBIC</constant>: Generalized cubic spline fractal interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_HERMITE</constant>: Hermite interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_HAMMING</constant>: Hamming filter.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_HANNING</constant>: Hanning filter.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_MITCHELL</constant>: Mitchell filter.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_POWER</constant>: Power interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_QUADRATIC</constant>: Inverse quadratic interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_SINC</constant>: Sinc function.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_NEAREST_NEIGHBOUR</constant>: Nearest neighbour interpolation.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_WEIGHTED4</constant>: Weighting filter.
         </simpara>
        </listitem>
        <listitem>
         <simpara>
          <constant>IMG_TRIANGLE</constant>: Triangle interpolation.
         </simpara>
        </listitem>
       </itemizedlist>
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

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

 <refsect1 role="changelog">
  &reftitle.changelog;
  <informaltable>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>&Version;</entry>
      <entry>&Description;</entry>
     </row>
    </thead>
    <tbody>
     &gd.changelog.image-param;
    </tbody>
   </tgroup>
  </informaltable>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title><function>imagesetinterpolation</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
// Load an image
$im = imagecreate(500, 500);

// By default interpolation is IMG_BILINEAR_FIXED, switch 
// to use the 'Mitchell' filter:
imagesetinterpolation($im, IMG_MITCHELL);

// Continue to work with $im ...
?>
]]>
    </programlisting>
   </example>
  </para>
 </refsect1>

 <refsect1 role="notes">
  &reftitle.notes;
  <para>
   Changing the interpolation method affects the following functions 
   when rendering:

   <itemizedlist>
    <listitem>
     <simpara>
      <function>imageaffine</function>
     </simpara>
    </listitem>
    <listitem>
     <simpara>
      <function>imagerotate</function>
     </simpara>
    </listitem>
   </itemizedlist>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <simplelist>
   <member><function>imagegetinterpolation</function></member>
  </simplelist>
 </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
-->
