Statement on glibc/iconv Vulnerability

imageavif

(PHP 8 >= 8.1.0)

imageavifGibt das Bild im Browser oder einer Datei aus.

Beschreibung

imageavif(
    GdImage $image,
    resource|string|null $file = null,
    int $quality = -1,
    int $speed = -1
): bool

Outputs or saves a AVIF Raster image from the given image.

Parameter-Liste

image

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

file

Der Pfad oder eine offene Stream-Ressource (die nach der Beendigung dieser Funktion automatisch geschlossen wird), in dem bzw. der die Datei gespeichert werden soll. Falls nicht gesetzt oder null, wird der rohe Bilddatenstrom direkt ausgegeben.

quality

quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, larger file). If -1 is provided, the default value 30 is used.

speed

speed is optional, and ranges from 0 (slow, smaller file) to 10 (fast, larger file). If -1 is provided, the default value 6 is used.

Rückgabewerte

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

Achtung

Wenn libgd das Bild nicht ausgeben kann, gibt diese Funktion true zurück.

Siehe auch

  • imagepng() - Ausgabe eines Bildes im Browser oder als Datei im PNG-Format
  • imagewbmp() - Gibt das Bild im Browser oder einer Datei aus.
  • imagejpeg() - Gibt das Bild im Browser oder einer Datei aus.
  • imagetypes() - Liefert die von der verwendeten PHP-Version unterstützten Grafikformate
add a note

User Contributed Notes 1 note

up
1
avi at orons dot pro
1 year ago
Usage example:
$image = imagecreatefromjpeg('test.jpg'); //read a jpg file
imageavif($image, 'test.avif'); //save an avif file
To Top