]> granicus.if.org Git - php/commit
Sync behavior of gdImageAutoCrop() with upstream
authorChristoph M. Becker <cmbecker69@gmx.de>
Sun, 25 Nov 2018 15:33:14 +0000 (16:33 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 1 Dec 2018 14:34:10 +0000 (15:34 +0100)
commit947ca9f43d7c67fd0913dad183bb4625cedbe8aa
treec1f436a05a1dedf9323015ce2f7886b7140d33a4
parent31f28961a7a1767af630357d90f90ea59bc795cd
Sync behavior of gdImageAutoCrop() with upstream

Since cropping support has been added to our bundled libgd,
`gdImageAutoCrop` differs from upstream in that `GD_CROP_DEFAULT` falls
back on `GD_CROP_SIDES` if there is no transparent color in the image.
While this difference seem to be a useful improvement in our bundled
libgd, upstream has not yet signaled that there willing to back-port
it[1], so we revert it to stay in sync with upstream.

We also remove the additional NULL bailout at the end of the function,
which doesn't appear to be relevant any longer since bug 77198 has been
fixed.

[1] <https://github.com/libgd/libgd/issues/298>
NEWS
UPGRADING
ext/gd/libgd/gd_crop.c
ext/gd/tests/imagecrop_auto-ext.phpt [deleted file]
ext/gd/tests/imagecrop_auto.phpt