Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Anatol Belski
bfb9be9bd4
Merge branch 'PHP-7.1'
...
* PHP-7.1:
remove TSRMLS_*
2016-11-22 00:33:29 +01:00
Anatol Belski
d61db8d602
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
remove TSRMLS_*
2016-11-22 00:32:42 +01:00
Anatol Belski
5e9b4c26a5
remove TSRMLS_*
2016-11-21 23:53:37 +01:00
Christoph M. Becker
189bbb586c
Merge branch 'pull-request/2164'
2016-11-13 23:31:40 +01:00
Joe Watkins
e0b6ac2976
Merge branch 'pull-request/2135'
2016-10-20 05:33:12 +01:00
Christoph M. Becker
209d4220d5
Add PHP bindings for setting and getting the image resolution
...
We expose the image resolution related GD functionality to userland
by introducing `imageresolution()` as getter/setter. Given only the
image argument, it returns the current resolution as indexed array.
Given only a second argument, it sets the horizontal and vertical
resolution to this value. Given three arguments, it sets the horizontal
and vertical resolution to the given arguments, respectively.
2016-10-18 01:53:39 +02:00
Christoph M. Becker
0f49aa3287
Merge branch 'pull-request/2151'
2016-10-17 10:37:38 +02:00
Christoph M. Becker
1aaa560d85
Mark functions as PHP_DEP_FE instead of manually emitting the notice
2016-10-15 23:41:33 +02:00
Christoph M. Becker
1490446ce0
RFC: Deprecate png2wbmp() and jpegwbmp()
...
See <https://wiki.php.net/rfc/deprecate-png-jpeg-2wbmp >.
2016-10-15 16:16:34 +02:00
Christoph M. Becker
c31eb5a407
Remove unused code
...
There is no gif2wbmp() or such, and it is highly unlikely that it'll be
ever added, so we remove the unused code.
2016-10-13 15:35:10 +02:00
Anatol Belski
fa45124138
fix syslog interference
2016-10-13 14:40:37 +02:00
Christoph M. Becker
7ce90014e2
Merge branch 'PHP-7.1'
2016-10-09 15:27:14 +02:00
Christoph M. Becker
a16f0c5e01
Merge branch 'PHP-7.0' into PHP-7.1
2016-10-09 15:21:40 +02:00
Christoph M. Becker
c930714cbe
Merge branch 'PHP-5.6' into PHP-7.0
2016-10-09 15:14:17 +02:00
Christoph M. Becker
b92216b97d
Fix #73272 : imagescale() affects imagesetinterpolation()
...
We must not permanently change the interpolation method, but rather
have to restore the old method after we're done with scaling the image.
2016-10-09 15:10:34 +02:00
Christoph M. Becker
432e16cb58
Unify error handling of bundled and external libgd
...
There's no need anymore to call an own error handler directly. Instead we
register our error handler and call libgd's error functions (which will
forward). We do this regardless of compiling with the bundled or an external
libgd.
2016-10-07 01:13:49 +02:00
Christoph M. Becker
ec591b555f
Change gdImageTrueColorToPalette() to return success/failure
...
We're porting the relevant changes from
<34a00a40
>.
We also check the return value in the PHP binding, and throw E_WARNING if
the conversion failed.
2016-10-03 12:02:31 +02:00
Christoph M. Becker
2a305b38b7
Implement request #33066 : Add GD Image Function gdImageOpenPolygon()
...
gdImageOpenPolygon() has been introduced with líbgd 2.0.29, so we finally
add a PHP binding for it, and port the respective libgd functionality to
PHP's bundled libgd.
2016-10-02 20:27:58 +02:00
Christoph M. Becker
82a8e57f37
Add support for gdEffectMultiply
...
gdLayerMultiply() has been introduced in libgd 2.1.1, and as such would have
been already available for imagelayereffect() with a system libgd. We port
the respective code to the bundled libgd, and also make IMG_EFFECT_MULTIPLY
available to userland.
2016-10-02 19:10:13 +02:00
Christoph M. Becker
d0f14a4429
Switch to libgd anti-aliased drawing API
...
Instead of rolling our own in the bundled libgd, we use libgd's anti-aliased
drawing API. This way imageantialias() is also available, when built against
a system libgd.
2016-10-02 13:16:40 +02:00
Christoph M. Becker
65ee87f20d
Refactor imagegammacorrect()
...
We apply the law `(b**r)**s == b**(r*s)` which holds for all non-negative b
and positive r,s, so a single pow() suffices. Furthermore, we precompute the
gamma, so the refactored code is simpler and faster.
2016-09-25 11:28:39 +02:00
Christoph M. Becker
2e1d20a28b
Merge branch 'pull-request/2026'
2016-09-24 15:41:55 +02:00
Christoph M. Becker
d95b8eaf31
Don't enforce palette conversion when writing GD images
...
The GD image format is able to handle truecolor images as of libgd 2.0.12
(<https://github.com/libgd/libgd/blob/gd-2.2.3/src/gd_gd.c#L31-L33 >).
Therefore we don't need the potentially lossy and time consuming palette
conversion.
This way, imagegd() can also be used to export raw truecolor image data.
2016-09-24 14:46:37 +02:00
Christoph M. Becker
1da79a6c6e
Fix #73157 (again): imagegd2() ignores 3rd param if 4 are given
...
Obviously, there was a bad merge.
2016-09-24 00:35:24 +02:00
Christoph M. Becker
9482932251
Merge branch 'PHP-7.1'
2016-09-24 00:13:36 +02:00
Christoph M. Becker
bf66af1d60
Merge branch 'PHP-7.0' into PHP-7.1
2016-09-24 00:07:50 +02:00
Christoph M. Becker
456be3ec37
Merge branch 'PHP-5.6' into PHP-7.0
2016-09-23 23:46:22 +02:00
Christoph M. Becker
c240978067
Fix #73157 : imagegd2() ignores 3rd param if 4 are given
...
We must initialize `q` for *more* than three parameters, too.
2016-09-23 23:42:34 +02:00
Christoph M. Becker
dc59aafa77
Merge branch 'PHP-7.1'
2016-09-20 01:38:28 +02:00
Christoph M. Becker
474428943f
Merge branch 'PHP-7.0' into PHP-7.1
2016-09-20 01:32:32 +02:00
Christoph M. Becker
ba2d9e1ff1
Merge branch 'PHP-5.6' into PHP-7.0
2016-09-20 01:25:08 +02:00
Christoph M. Becker
fc2cadca2d
Merge branch 'pull-request/1845' into PHP-5.6
2016-09-20 01:05:57 +02:00
Andrea Faulds
3cc9090101
Remove remaining zpp fallback code (master branch)
...
Follow-up to d690014bf3
2016-09-11 22:50:24 +01:00
Stanislav Malyshev
6e7d4fdde4
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Change the name of the second parameter of image writer functions
2016-09-05 00:43:52 -07:00
Christoph M. Becker
f203de0748
Change the name of the second parameter of image writer functions
...
As of PHP 5.4.0 the second parameter of all image writer functions (except
imagexbm) accepts also a stream resource. Therefore the parameter name
`filename` is inappropriate. We change it to `to` according to what it's
already called in _php_image_output_ctx().
We consider the reflection only related BC break acceptable for a minor version.
2016-09-05 00:43:30 -07:00
Christoph M. Becker
af69021f67
Merge branch 'PHP-7.1'
2016-09-03 14:01:39 +02:00
Christoph M. Becker
9eeb705eca
Merge branch 'PHP-7.0' into PHP-7.1
2016-09-03 13:53:07 +02:00
Christoph M. Becker
0bc7e0c0ce
Merge branch 'PHP-5.6' into PHP-7.0
2016-09-03 13:46:03 +02:00
Christoph M. Becker
bca913d70a
Fix proto comment
...
While we're at it, we also change a related comment to use American English
consistently.
2016-09-03 13:41:29 +02:00
Christoph M. Becker
0bf11d1e71
Implement FAST_ZPP support for imagecolorat() and imagesetpixel()
...
These functions may be used in tight loops to do image manipulation in
userland. Using FAST_ZPP is supposed to bring considerable performance
improvements in this case; we've been able to measure up to 25%.
2016-09-02 19:06:26 +02:00
Christoph M. Becker
2c74a5282e
Merge branch 'PHP-7.1'
2016-08-21 20:04:18 +02:00
Christoph M. Becker
5347246f56
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-21 19:55:09 +02:00
Christoph M. Becker
4c13a7f5c4
Merge branch 'PHP-5.6' into PHP-7.0
2016-08-21 19:48:38 +02:00
Christoph M. Becker
6a232c3604
Fix #68716 : possible resource leaks in _php_image_convert()
...
We properly clean up after ourselves wrt. to closing opened file pointers
and created images.
2016-08-21 19:39:58 +02:00
Xinchen Hui
660d8f1622
Merge branch 'PHP-7.1'
...
* PHP-7.1: (49 commits)
Update NEWs
Update NEWs
Unused label
Fixed bug #72853 (stream_set_blocking doesn't work)
fix test
Bug #72663 - part 3
Bug #72663 - part 2
Bug #72663 - part 1
Update NEWS
BLock test with memory leak
fix tests
Fix TSRM build
Fix bug #72850 - integer overflow in uuencode
Fixed bug #72849 - integer overflow in urlencode
Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
Fix bug #72838 - Integer overflow lead to heap corruption in sql_regcase
Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
Fix bug #72836 - integer overflow in base64_decode caused heap corruption
Fix for bug #72807 - do not produce strings with negative length
Fix for bug #72790 and bug #72799
...
2016-08-17 17:15:11 +08:00
Xinchen Hui
ce6ad9bdd9
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0: (48 commits)
Update NEWs
Unused label
Fixed bug #72853 (stream_set_blocking doesn't work)
fix test
Bug #72663 - part 3
Bug #72663 - part 2
Bug #72663 - part 1
Update NEWS
BLock test with memory leak
fix tests
Fix TSRM build
Fix bug #72850 - integer overflow in uuencode
Fixed bug #72849 - integer overflow in urlencode
Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
Fix bug #72838 - Integer overflow lead to heap corruption in sql_regcase
Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
Fix bug #72836 - integer overflow in base64_decode caused heap corruption
Fix for bug #72807 - do not produce strings with negative length
Fix for bug #72790 and bug #72799
Fix bug #72730 - imagegammacorrect allows arbitrary write access
...
Conflicts:
ext/standard/var_unserializer.c
2016-08-17 17:14:30 +08:00
Stanislav Malyshev
1bd103df00
Fix bug #72730 - imagegammacorrect allows arbitrary write access
2016-08-16 22:55:40 -07:00
Stanislav Malyshev
a3598dd7c9
Fix bug#72697 - select_colors write out-of-bounds
2016-08-16 22:55:40 -07:00
Anatol Belski
28022c9b1f
Fix bug#72697 - select_colors write out-of-bounds
...
(cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4)
Conflicts:
ext/gd/gd.c
2016-08-16 14:37:39 +02:00