diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-12-07 12:07:51 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-12-07 12:08:30 +0100 |
commit | aba070e6308519be6b44e2ec6d153bb8b1e08371 (patch) | |
tree | 719d5f6530d223383dacc1e3e01e50d062a97be9 | |
parent | 07fc0764d1ca33bc9a7e5ccb0506f835827c402a (diff) | |
parent | b5d2cbe02739a0c9b16e7b37ce44e71d1d657daa (diff) | |
download | php-git-aba070e6308519be6b44e2ec6d153bb8b1e08371.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #78923: Artifacts when convoluting image with transparency
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/gd/libgd/gd_filter.c | 1 | ||||
-rw-r--r-- | ext/gd/tests/bug47946.phpt | 4 | ||||
-rw-r--r-- | ext/gd/tests/bug47946_exp.png | bin | 396 -> 355 bytes |
4 files changed, 4 insertions, 3 deletions
@@ -15,6 +15,8 @@ PHP NEWS - GD: . Fixed bug #78849 (GD build broken with -D SIGNED_COMPARE_SLOW). (cmb) + . Fixed bug #78923 (Artifacts when convoluting image with transparency). + (wilson chen) - FPM: . Fixed bug #76601 (Partially working php-fpm ater incomplete reload). diff --git a/ext/gd/libgd/gd_filter.c b/ext/gd/libgd/gd_filter.c index 566330668e..db364c923e 100644 --- a/ext/gd/libgd/gd_filter.c +++ b/ext/gd/libgd/gd_filter.c @@ -362,6 +362,7 @@ int gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, flo for ( y=0; y<src->sy; y++) { for(x=0; x<src->sx; x++) { new_r = new_g = new_b = 0; + pxl = f(srcback, x, y); new_a = gdImageAlpha(srcback, pxl); for (j=0; j<3; j++) { diff --git a/ext/gd/tests/bug47946.phpt b/ext/gd/tests/bug47946.phpt index aeea7fb324..c329094863 100644 --- a/ext/gd/tests/bug47946.phpt +++ b/ext/gd/tests/bug47946.phpt @@ -1,11 +1,9 @@ --TEST-- Bug #47946 (ImageConvolution overwrites background) ---DESCRIPTION-- -The expected image has black pixel artifacts, what is another issue, though -(perhaps #40158). --SKIPIF-- <?php if (!extension_loaded('gd')) die('skip gd extension not available'); +if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream fix not yet released'); ?> --FILE-- <?php diff --git a/ext/gd/tests/bug47946_exp.png b/ext/gd/tests/bug47946_exp.png Binary files differindex 7eb462dd88..4c69a9eea3 100644 --- a/ext/gd/tests/bug47946_exp.png +++ b/ext/gd/tests/bug47946_exp.png |