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

VersionBeschreibung
8.0.0image 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

To Top