array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.imagesetinterpolation.php', 1 => 'imagesetinterpolation', 2 => 'Set the interpolation method', ), 'up' => array ( 0 => 'ref.image.php', 1 => 'GD- und Image-Funktionen', ), '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

Beschreibung

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.

Parameter-Liste

image

Ein GdImage-Objekt, das von einer der Funktionen zur Bilderzeugung, z. B. imagecreatetruecolor(), zurückgegeben wurde.

method

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

Rückgabewerte

Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben.

Changelog

Version Beschreibung
8.0.0 image erwartet nun eine GdImage-Instanz; vorher wurde eine gültige gd-Ressource erwartet.

Beispiele

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

Anmerkungen

Changing the interpolation method affects the following functions when rendering:

Siehe auch