Forum und email

imagejpeg

(PHP 4, PHP 5)

imagejpeg — Output image to browser or file

Descrizione

bool imagejpeg ( resource $image [, string $filename [, int $quality ]] )

imagejpeg() creates a JPEG file from the given image .

Elenco dei parametri

image

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

filename

The path to save the file to. If not set or NULL, the raw image stream will be outputted directly.

To skip this argument in order to provide the quality parameter, use NULL.

quality

quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default is the default IJG quality value (about 75).

Valori restituiti

Restituisce TRUE in caso di successo, FALSE in caso di fallimento.

Note

Nota: Il supporto JPEG è disponibile solo se PHP è stato compilato con GD-1.8 o successivi.

Nota: If you want to output Progressive JPEGs, you need to set interlacing on with imageinterlace().