diff options
author | Pierre Joye <pajoye@php.net> | 2010-10-04 22:30:35 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2010-10-04 22:30:35 +0000 |
commit | cccc349aa5d092d9e3bc808e0fcbbd2d8562a8f5 (patch) | |
tree | 6e30dd3a29961df3c1f76edf37800ed405ba2ff4 /ext/gd/gd_ctx.c | |
parent | 304bc60e9898da7f1420a372ec929ae331be2570 (diff) | |
download | php-git-cccc349aa5d092d9e3bc808e0fcbbd2d8562a8f5.tar.gz |
- initial webp support, rely on libpx, final version will be either w/o dep or using libwebp (to be released by g)
Diffstat (limited to 'ext/gd/gd_ctx.c')
-rw-r--r-- | ext/gd/gd_ctx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index c25a7dc3ac..f747124ff9 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -73,7 +73,9 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, /* PHP_GDIMG_TYPE_GIF * PHP_GDIMG_TYPE_PNG * PHP_GDIMG_TYPE_JPG - * PHP_GDIMG_TYPE_WBM */ + * PHP_GDIMG_TYPE_WBM + * PHP_GDIMG_TYPE_WEBP + * */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!ll", &imgind, &file, &file_len, &quality, &basefilter) == FAILURE) { return; } @@ -125,6 +127,12 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, case PHP_GDIMG_TYPE_JPG: (*func_p)(im, ctx, q); break; + case PHP_GDIMG_TYPE_WEBP: + if (q == -1) { + q = 80; + } + (*func_p)(im, ctx, q); + break; case PHP_GDIMG_TYPE_PNG: (*func_p)(im, ctx, q, f); break; |