GD Funkcje
PHP Manual

imagejpeg

(PHP 4, PHP 5)

imagejpegOutput image to browser or file

Opis

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

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

Parametry

obraz

Zasób obrazu, zwrócony przez jedną z funkcji tworzących obrazy, taką jak 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).

Zwracane wartości

Zwraca TRUE w przypadku powodzenia, FALSE w przypadku błędu.

Notatki

Informacja: Obsługa JPEG jest dostępna tylko jeśli PHP zostało skompilowane z GD-1.8 lub nowszym.

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

Patrz także


GD Funkcje
PHP Manual