add missing conditions

This commit is contained in:
Remi Collet 2021-11-25 13:20:27 +01:00
parent f566cba0bb
commit 54f1f8cf2a
No known key found for this signature in database
GPG Key ID: DC9FF8D3EE5AF27F

View File

@ -4258,21 +4258,27 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
}
switch (image_type) {
#ifdef HAVE_GD_JPG
case PHP_GDIMG_TYPE_JPG:
gdImageJpegCtx(im, ctx, (int) quality);
break;
#endif
#ifdef HAVE_GD_WEBP
case PHP_GDIMG_TYPE_WEBP:
if (quality == -1) {
quality = 80;
}
gdImageWebpCtx(im, ctx, (int) quality);
break;
#endif
#ifdef HAVE_GD_AVIF
case PHP_GDIMG_TYPE_AVIF:
if (speed == -1) {
speed = 6;
}
gdImageAvifCtx(im, ctx, (int) quality, (int) speed);
break;
#endif
#ifdef HAVE_GD_PNG
case PHP_GDIMG_TYPE_PNG:
#ifdef HAVE_GD_BUNDLED