Re: [RFC] add radius and sigma to IMG_FILTER_GAUSSIAN_BLUR
| From: | Christoph M. Becker | Date: | Wed, 28 Sep 2016 10:34:07 +0000 |
| Subject: | Re: [RFC] add radius and sigma to IMG_FILTER_GAUSSIAN_BLUR | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96174@lists.php.net to get a copy of this message | ||
On 28.09.2016 at 10:09, Felix Niklas wrote:
> tl;dr: I’d like to add the parameters radius and sigma to the
> $filtertype IMG_FILTER_GAUSSIAN_BLUR by switching the underlying
> libgd method from <gdImageGaussianBlur> (accepts no parameters) to
> <gdImageCopyGaussianBlurred> (accepts these parameters).
I agree that gdImageCopyGaussianBlurred() should be preferred over
gdImageGaussianBlur(), at least in theory (not sure if
gdImageCopyGaussianBlurred() is sufficiently well (field-)tested).
The question is whether this should be done by the PHP binding, or in
libgd itself, where a comment for gdImageGaussianBlur() already states:
| Future versions of this function may fall back to calling it
| [gdImageCopyGaussianBlur()] instead of <gdImageConvolution>, causing
| subtle changes so be warned.
Either way, a user preferring the "classic" implementation could easily
use gdImageConvolution() and imageconvolution(), respectively.
Anyhow, even if we adjust the PHP binding only, the RFC process might
not be necessary; instead a PR might be sufficient.
--
Christoph M. Becker