<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.image.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.imagesetinterpolation.php',
    1 => 'imagesetinterpolation',
    2 => 'D&eacute;finit la m&eacute;thode d\'interpolation',
  ),
  'up' => 
  array (
    0 => 'ref.image.php',
    1 => 'Fonctions GD et images',
  ),
  'prev' => 
  array (
    0 => 'function.imagesetclip.php',
    1 => 'imagesetclip',
  ),
  'next' => 
  array (
    0 => 'function.imagesetpixel.php',
    1 => 'imagesetpixel',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/image/functions/imagesetinterpolation.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imagesetinterpolation" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagesetinterpolation</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imagesetinterpolation</span> &mdash; <span class="dc-title">Définit la méthode d&#039;interpolation</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imagesetinterpolation-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imagesetinterpolation</strong></span>(<span class="methodparam"><span class="type"><a href="class.gdimage.php" class="type GdImage">GdImage</a></span> <code class="parameter">$image</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$method</code><span class="initializer"> = <strong><code><a href="image.constants.php#constant.img-bilinear-fixed">IMG_BILINEAR_FIXED</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Définit la méthode d&#039;interpolation ; le fait de définir une méthode d&#039;interpolation
   affecte le rendu de plusieurs fonctions en GD, par exemple la fonction
   <span class="function"><a href="function.imagerotate.php" class="function">imagerotate()</a></span>.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.imagesetinterpolation-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
<dt><code class="parameter">image</code></dt><dd><p class="para">
 Un objet <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span>, retournée par une des fonctions de
 création d&#039;images, comme <span class="function"><a href="function.imagecreatetruecolor.php" class="function">imagecreatetruecolor()</a></span>.
</p></dd>
    
     <dt><code class="parameter">method</code></dt>
     <dd>
      <p class="para">
       La méthode d&#039;interpolation, qui peut être une parmi :
       <ul class="itemizedlist">
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-bell">IMG_BELL</a></code></strong> : filtre Bell.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-bessel">IMG_BESSEL</a></code></strong> : filtre Bessel.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-bicubic">IMG_BICUBIC</a></code></strong> : interpolation bicubique.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-bicubic-fixed">IMG_BICUBIC_FIXED</a></code></strong> : implémentation de point fixe d&#039;une interpolation bicubique.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-bilinear-fixed">IMG_BILINEAR_FIXED</a></code></strong> : implémentation de point fixe d&#039;une interpolation bilinéaire
          (<code class="literal">par défaut (y compris pour la création d&#039;image)</code>).
         </span>
        </li>        
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-blackman">IMG_BLACKMAN</a></code></strong> : fonction de fenêtre Blackman.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-box">IMG_BOX</a></code></strong> : filtre de flou Box.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-bspline">IMG_BSPLINE</a></code></strong> : interpolation Spline.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-catmullrom">IMG_CATMULLROM</a></code></strong> : interpolation cubique Hermite spline.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-gaussian">IMG_GAUSSIAN</a></code></strong> : fonction gaussienne.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-generalized-cubic">IMG_GENERALIZED_CUBIC</a></code></strong> : interpolation fractale cubique généralisée spline.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-hermite">IMG_HERMITE</a></code></strong> : interpolation Hermite.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-hamming">IMG_HAMMING</a></code></strong> : filtre Hamming.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-hanning">IMG_HANNING</a></code></strong> : filtre Hanning.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-mitchell">IMG_MITCHELL</a></code></strong> : filtre Mitchell.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-power">IMG_POWER</a></code></strong> : interpolation Power.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-quadratic">IMG_QUADRATIC</a></code></strong> : interpolation quadratique inverse.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-sinc">IMG_SINC</a></code></strong> : fonction Sinc.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-nearest-neighbour">IMG_NEAREST_NEIGHBOUR</a></code></strong> : interpolation du voisin le plus proche.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-weighted4">IMG_WEIGHTED4</a></code></strong> : filtre Weighting.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="image.constants.php#constant.img-triangle">IMG_TRIANGLE</a></code></strong> : interpolation Triangle.
         </span>
        </li>
       </ul>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.imagesetinterpolation-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Cette fonction retourne <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> en cas de succès ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imagesetinterpolation-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">image</code> attend une instance de <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span> désormais;
  auparavant, une <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="literal">gd</code> était attendue.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 examples" id="refsect1-function.imagesetinterpolation-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>imagesetinterpolation()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Chargement de l'image<br /></span><span style="color: #0000BB">$im </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecreate</span><span style="color: #007700">(</span><span style="color: #0000BB">500</span><span style="color: #007700">, </span><span style="color: #0000BB">500</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Par défaut, l'interpolation est IMG_BILINEAR_FIXED ; on utilse plutôt<br />// le filtre 'Mitchell' :<br /></span><span style="color: #0000BB">imagesetinterpolation</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">IMG_MITCHELL</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// On continue de travailler avec $im ...<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>

 
 <div class="refsect1 notes" id="refsect1-function.imagesetinterpolation-notes">
  <h3 class="title">Notes</h3>
  <p class="para">
   La modification de la méthode d&#039;interpolation affecte les fonctions suivantes lors du rendu :
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      <span class="function"><a href="function.imageaffine.php" class="function">imageaffine()</a></span>
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <span class="function"><a href="function.imagerotate.php" class="function">imagerotate()</a></span>
     </span>
    </li>
   </ul>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.imagesetinterpolation-seealso">
  <h3 class="title">Voir aussi</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.imagegetinterpolation.php" class="function" rel="rdfs-seeAlso">imagegetinterpolation()</a> - R&eacute;cup&egrave;re la m&eacute;thode d'interpolation</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>