Christoph M. Becker
76179cdf3d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Add missing skip keyword in tests
Update NEWS for 7.4.0RC4
Update NEWS for PHP 7.4.0RC3
2019-10-01 11:19:43 +02:00
Christoph M. Becker
73f29a5c5e
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Add missing skip keyword in tests
2019-10-01 11:17:53 +02:00
Christoph M. Becker
2fc5d00afa
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Add missing skip keyword in tests
2019-10-01 11:15:12 +02:00
Fabien Villepinte
209e37db7d
Add missing skip keyword in tests
2019-10-01 11:13:36 +02:00
Nikita Popov
235983dfde
Merge branch 'PHP-7.4'
2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4
Fix borked SKIPIFs
2019-09-30 17:51:41 +02:00
Mark
8aad466c42
Convert GD Resources to objects
2019-09-30 15:14:02 +02:00
Christoph M. Becker
4f4074328c
Prefer ValueError over Error in GD
...
Cf. <https://github.com/php/php-src/pull/4682 >.
2019-09-10 12:37:42 +02:00
Peter Cowburn
a43679632b
raise ValueError from imagecreate/imagecreatetruecolor
...
Raise a ValueError instead of a plain Error when calling imagecreate()
or imagecreatetruecolor() with too big or small values for the width or
height arguments.
2019-09-09 21:06:00 +01:00
Mark
5af8361060
Warnings to Errors: imagesetstyle
2019-09-04 15:21:59 +02:00
Mark
4a1f0eb9d3
Warnings to errors in imageaffinematrix*()
2019-09-04 15:18:07 +02:00
Mark
06a3dd536d
Warnings to errors in imagecrop(auto)
2019-09-04 15:12:04 +02:00
Mark
d1f9ab11b3
Warnings to errors imageconvolution
2019-09-04 12:42:17 +02:00
Mark
34865f54e7
Warnings become errors for imagepolygon et al
2019-09-04 12:35:48 +02:00
Mark
87dbb32246
Negative checks for gamma
2019-09-04 12:31:01 +02:00
Mark
af8ecb39ae
Warnings for image colour range check now throw exceptions
2019-09-04 12:27:08 +02:00
Mark
6c6c109e24
Warnings to errors for imagecreatefromgd2part
...
We also delete tests which were duplicates of a completely unrelated
test.
2019-09-04 12:22:27 +02:00
Mark
6a05e42459
Warnings to Errors imagetruecolortopalette
2019-09-04 12:14:34 +02:00
Mark
fde52e8a2c
Warnings to Errors imagecreate(truecolor)
...
We also add a test helper which we will be using for other GD functions
as well.
2019-09-04 12:09:07 +02:00
Christoph M. Becker
7469d572f2
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Support TGA reading
2019-06-20 23:41:23 +02:00
Christoph M. Becker
81fd113506
Support TGA reading
...
We add PHP bindings for libgd's features to read TGA files, which are
available as of libgd 2.1.0.
As PHP's bundled libgd doesn't yet include the respective features of the
external libgd, we add these.
Since TGA has no easily recognizable file signature, we don't add TGA
support for imagecreatefromstring() or getimagesize() and friends.
2019-06-20 23:40:51 +02:00
Nikita Popov
681136212f
Merge branch 'PHP-7.4'
2019-06-20 10:16:31 +02:00
Nikita Popov
4488475a3e
imagecolorallocate(): Check that RGB components are in-range
...
Instead of letting them bleed over into other components.
2019-06-20 10:09:54 +02:00
Christoph M. Becker
b994fd81cb
Throw TypeError instead of warning in case of invalid path
...
For consistency with imagegd(), imagegd2() and imagexbm(), which throw
a TypeError if a path containing NUL bytes is given, we throw a
TypeError for the other image writer functions as well.
2019-06-13 22:37:50 +02:00
Christoph M. Becker
2018615c2a
Remove superfluous CLEAN sections
...
These actually should have been removed with commit be73ae3[1].
[1] <be73ae3132 >
2019-06-13 14:33:41 +02:00
Christoph M. Becker
fc7b3cc7ca
Fix nullbyte tests
...
As of PHP 8.0.0, failing ZPP throws instead of issuing warnings, to
which we have to cater to.
2019-06-12 12:48:03 +02:00
Christoph M. Becker
be73ae3132
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Simplify GD null byte injection tests
2019-06-12 12:06:24 +02:00
Christoph M. Becker
37d0c7b0e4
Simplify GD null byte injection tests
...
These tests actually check that no file with a name containing a NUL is
created by the GD image output functions. This is superfluous, since
it is sufficient to check that the function failed, and that an
appropriate warning has been raised.
We also add missing nullbyte injection tests.
2019-06-12 12:04:01 +02:00
Joe Watkins
74a82ca91c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
fix flaky gd tests
2019-06-12 07:58:56 +02:00
Joe Watkins
2dfa495311
fix flaky gd tests
2019-06-12 07:52:28 +02:00
Nikita Popov
1df8175b61
Convert fetch_resource warnings into TypeErrors
...
More type checks that are not part of zpp and should generate a
TypeError in PHP 8.
2019-06-03 09:17:12 +02:00
Stanislav Malyshev
12d68d0272
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Update NEWS
Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
Fix #77973 : Uninitialized read in gdImageCreateFromXbm
2019-05-27 16:49:37 -07:00
Stanislav Malyshev
5e3dc08826
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Update NEWS
Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
Fix #77973 : Uninitialized read in gdImageCreateFromXbm
2019-05-27 16:49:31 -07:00
Stanislav Malyshev
c7eb0feed8
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Update NEWS
Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
Fix #77973 : Uninitialized read in gdImageCreateFromXbm
2019-05-27 16:49:25 -07:00
Stanislav Malyshev
e77c8e45ba
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Update NEWS
Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
Fix #77973 : Uninitialized read in gdImageCreateFromXbm
2019-05-27 16:49:19 -07:00
Christoph M. Becker
ed6dee9a19
Fix #77973 : Uninitialized read in gdImageCreateFromXbm
...
We have to ensure that `sscanf()` does indeed read a hex value here,
and bail out otherwise.
2019-05-27 16:11:32 -07:00
Peter Kokot
9604e2f28f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Rename *.jpeg files to *.jpg
2019-05-11 03:28:11 +02:00
Peter Kokot
a68e0767b3
Rename *.jpeg files to *.jpg
...
These file extensions are not part of these tests and *.jpg is more
common.
2019-05-11 03:22:19 +02:00
Kalle Sommer Nielsen
569e338104
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Implemented the gdScatter filter I wrote almost 10 years ago
2019-05-10 02:24:01 +03:00
Kalle Sommer Nielsen
bcd11a1dfb
Implemented the gdScatter filter I wrote almost 10 years ago
...
This filter is available as of libgd 2.1.0 which is our bare minimum for
external compilation of ext/gd.
The scatter filter works by iterating over all pixels in the image and
shifting them randomly based on two modifier (`plus` and `sub`) values:
dest_x = (int)(x + ((rand() % (plus - sub)) + sub));
dest_y = (int)(y + ((rand() % (plus - sub)) + sub));
Additionally the scatter filter also supports by only shifting pixels where
the current pixel being iterated is one or more colors, allowing the scatter
filter to only effect solid colors in part of an image.
Note, due to the nature of randomness and implementation, pixels who were
shifted ahead of iteration will be shifted once more and therefore the
bottom right of an image may contain a slight scatter effect due to this.
2019-05-10 02:23:40 +03:00
Christoph M. Becker
3891e0d13a
Add tests for bug77943
2019-04-29 16:29:08 +02:00
Christoph M. Becker
f70a89318e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #77943 : imageantialias($image, false); does not work
2019-04-29 16:19:21 +02:00
Christoph M. Becker
85cf1cb077
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #77943 : imageantialias($image, false); does not work
2019-04-29 16:18:54 +02:00
Christoph M. Becker
3fc1bdc81c
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #77943 : imageantialias($image, false); does not work
2019-04-29 16:18:27 +02:00
Christoph M. Becker
cd94cf60a2
Fix #77943 : imageantialias($image, false); does not work
...
Firstly, we must not call `gdImageSetAntiAliased()` (which sets the
color to anti-alias), but rather modify the `gdImage.AA` flag.
Furthermore, we have to actually use the supplied boolean value.
We also make sure that we don't attempt to enable anti-aliasing for
palette images.
2019-04-29 16:16:46 +02:00
Peter Kokot
9872b6369f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Added test for imagecolorclosesthwb
2019-04-20 19:32:02 +02:00
Rodrigo Prado
ba0f7f7e43
Added test for imagecolorclosesthwb
...
The function was not tested yet.
See http://gcov.php.net/viewer.php?version=PHP_HEAD&func=tested_functions
2019-04-20 19:31:45 +02:00
Peter Kokot
6426420f61
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 23:36:47 +01:00
Fabien Villepinte
26dfce7f36
Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 22:55:30 +01:00
Nikita Popov
852485d8ec
Adjust tests for zpp TypeError change
2019-03-11 11:32:20 +01:00