Extrait de la doc GD pour la qualité (La doc PHP n'en parle pas!)
void gdImageJpeg(gdImagePtr im, FILE *out, int quality) (FUNCTION)
void gdImageJpegCtx(gdImagePtr im, gdIOCtx *out, int quality) (FUNCTION)
gdImageJpeg outputs the specified image to the specified file in JPEG format. The file must be open for writing. Under MSDOS and all versions of Windows, it is important to use "wb" as opposed to simply "w" as the mode when opening the file, and under Unix there is no penalty for doing so. gdImageJpeg does not close the file; your code must do so.
If quality is negative, the default IJG JPEG quality value (which should yield a good general quality / size tradeoff for most situations) is used. Otherwise, for practical purposes, quality should be a value in the range 0-95, higher quality values usually implying both higher quality and larger image sizes.
If you have set image interlacing using gdImageInterlace, this function will interpret that to mean you wish to output a progressive JPEG. Some programs (e.g., Web browsers) can display progressive JPEGs incrementally; this can be useful when browsing over a relatively slow communications link, for example. Progressive JPEGs can also be slightly smaller than sequential (non-progressive) JPEGs.
---------------
Laissez l'Etat dans les toilettes où vous l'avez trouvé.