Note: This manual is provided for your convenience only - this is not the official source and may not be 100% up to date.
(PHP 3 >= 3.0.16, PHP 4, PHP 5)
imagejpeg -- Output image to browser or file
( resource image [, string filename [, int quality]] )
imagejpeg() creates a JPEG file from
An image resource, returned by one of the image creation functions,
such as imagecreatetruecolor().
The path to the saved file. If not set or NULL, the raw image stream
will be outputed directly.
To skip this argument in order to provide the
quality parameter, use NULL.
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).
Returns TRUE on success or FALSE on failure.
Note: JPEG support is only available if
PHP was compiled against GD-1.8 or later.
If you want to output Progressive JPEGs, you need to set interlacing
on with imageinterlace().