Skip to content

Commit 54f1f8c

Browse files
committed
add missing conditions
1 parent f566cba commit 54f1f8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/gd/gd.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4258,21 +4258,27 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
42584258
}
42594259

42604260
switch (image_type) {
4261+
#ifdef HAVE_GD_JPG
42614262
case PHP_GDIMG_TYPE_JPG:
42624263
gdImageJpegCtx(im, ctx, (int) quality);
42634264
break;
4265+
#endif
4266+
#ifdef HAVE_GD_WEBP
42644267
case PHP_GDIMG_TYPE_WEBP:
42654268
if (quality == -1) {
42664269
quality = 80;
42674270
}
42684271
gdImageWebpCtx(im, ctx, (int) quality);
42694272
break;
4273+
#endif
4274+
#ifdef HAVE_GD_AVIF
42704275
case PHP_GDIMG_TYPE_AVIF:
42714276
if (speed == -1) {
42724277
speed = 6;
42734278
}
42744279
gdImageAvifCtx(im, ctx, (int) quality, (int) speed);
42754280
break;
4281+
#endif
42764282
#ifdef HAVE_GD_PNG
42774283
case PHP_GDIMG_TYPE_PNG:
42784284
#ifdef HAVE_GD_BUNDLED

0 commit comments

Comments
 (0)