array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'function.imagesetinterpolation.php', 1 => 'imagesetinterpolation', 2 => 'Set the interpolation method', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'GD and Image Funzioni', ), 'prev' => array ( 0 => 'function.imagesetclip.php', 1 => 'imagesetclip', ), 'next' => array ( 0 => 'function.imagesetpixel.php', 1 => 'imagesetpixel', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/image/functions/imagesetinterpolation.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

imagesetinterpolation

(PHP 5 >= 5.5.0, PHP 7, PHP 8)

imagesetinterpolationSet the interpolation method

Descrizione

imagesetinterpolation(GdImage $image, int $method = IMG_BILINEAR_FIXED): bool

Sets the interpolation method, setting an interpolation method affects the rendering of various functions in GD, such as the imagerotate() function.

Elenco dei parametri

image

Una risorsa immagine, restituita da una delle funzioni di creazione immagine, come imagecreatetruecolor().

method

The interpolation method, which can be one of the following:

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento.

Log delle modifiche

Versione Descrizione
8.0.0 image expects a GdImage instance now; previously, a valid gd resource was expected.

Esempi

Example #1 imagesetinterpolation() example

<?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 ...
?>

Note

Changing the interpolation method affects the following functions when rendering:

Vedere anche: