imageavif

(PHP 8 >= 8.1.0)

imageavifInvia l'immagine al browser o in un file

Descrizione

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.

Elenco dei parametri

image

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

file

Il percorso in cui salvare il file. Se non è impostato o è null, viene restituito il flusso raw dell'immagine.

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.

Valori restituiti

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

Attenzione

However, if libgd fails to output the image, this function returns true.

Vedere anche:

  • imagepng() - Output a PNG image to either the browser or a file
  • imagewbmp() - Invia l'immagine al browser o in un file
  • imagejpeg() - Invia l'immagine al browser o in un file
  • imagetypes() - Return the image types supported by this PHP build
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top