| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* PHP-8.0:
Return bool from imageinterlace()
|
| |
| |
| |
| |
| |
| |
| | |
The function accepts a bool since PHP 8.0, so it should also return
a bool to keep things consistent.
Furthermore a null return from this functions is not possible.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.
This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)
RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
Closes GH-6475.
|
|
|
|
|
|
|
| |
If the string is too short, we should treat this the same way as
an unrecognized image type. This function should be usable to
determine whether something is a valid image without doing any
checks beforehand.
|
|
|
|
| |
Closes GH-6308.
|
|
|
|
|
|
| |
We previously couldn't increase the error level here because it
was coupled to comparison handling. This is no longer the case
in PHP 8.
|
|
|
|
|
| |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do this because the error is generated by zpp and
it's easier to always throw TypeError there.
This changes the zpp implementation to throw a TypeError only if
the type is actually wrong and throw ValueError for null bytes.
The error message is also split accordingly, to be more precise.
Closes GH-6094.
|
|
|
|
| |
Closes GH-6075
|
|
|
|
| |
Closes GH-6023
|
|
|
|
| |
Closes GH-5958
|
|
|
|
| |
Closes GH-5598
|
|
|
|
| |
Closes GH-5779
|
|
|
|
| |
Closes GH-5759
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix #79676: imagescale adds black border with IMG_BICUBIC
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix #79676: imagescale adds black border with IMG_BICUBIC
|
| | |
| | |
| | |
| | |
| | | |
We have to loop over all image pixels to avoid the black border. This
is also done in external libgd in `_gdScaleOneAxis` and `_gdScalePass`.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79615: Wrong GIF header written in GD GIFEncode
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79615: Wrong GIF header written in GD GIFEncode
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The color resolution is expected in bits 4-6 of the packed fields byte
of the logical screen descriptor (byte 10 of the GIF data stream),
according to the specification[1], section 18.
[1] <https://www.w3.org/Graphics/GIF/spec-gif89a.txt>
|
| | |
| | |
| | |
| | | |
Closes GH-5340
|
| | |
| | |
| | |
| | | |
Closes GH-5327
|
| | |
| | |
| | |
| | | |
Closes GH-5278
|
| | |
| | |
| | |
| | | |
Closes GH-5211
|
| | |
| | |
| | |
| | | |
Closes GH-5092
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While `imagesetinterpolation()` is available as of PHP 5.5.0,
there is no according getter function, so users would have to track the
current interpolation method manually.
To remedy this, we introduce `imagegetinterpolation()` as thin wrapper
for `gdImageGetInterpolationMethod()` (which has been introduced with
libgd 2.1.1), and use `im->interpolation_id` as fallback for older
libgd. Since our bundled libgd does not yet have this function, we add
it.
We also simplify the recently introduced bug79068.phpt, where it is
sufficient to check that the interpolation method has not been changed.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79068: gdTransformAffineCopy() changes interpolation method
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79068: gdTransformAffineCopy() changes interpolation method
|
| | |
| | |
| | |
| | |
| | | |
We port
<https://github.com/libgd/libgd/commit/9088591eae437358ee5b929adf82865e37e3001e>.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79067: gdTransformAffineCopy() may use unitialized values
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79067: gdTransformAffineCopy() may use unitialized values
|
| | |
| | |
| | |
| | |
| | | |
We port
<https://github.com/libgd/libgd/commit/7a06c1669c563917bc48c464521e3de962ddb4e8>.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #78923: Artifacts when convoluting image with transparency
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #78923: Artifacts when convoluting image with transparency
|
| | |
| | |
| | |
| | |
| | |
| | | |
We have to properly initialize `pxl` before using it.
Fix ported from <https://github.com/libgd/libgd/pull/559>.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
That parameter is mostly useless in practise, and likely has been
directly ported from the underlying `gdImagePolygon()` and friends,
which require that parameter since the number of elements of the point
array would otherwise be unknown. Typical usages of `imagepolygon()`,
`imageopenpolygon()` and `imagefilledpolygon()` pass `count($points)/2`
or hard-code this value as literal. Since explicitly specifying this
parameter is annoying and error-prone, we offer the possibility to omit
it, in which case the `$points` array must have an even number of
elements, and the number of points is calculated as `count($points)/2`.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.
Closes GH-4872.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We actually have to check `$num_points` instead of `2*count($points)`,
because the latter may be greater than the former, but not all elements
of `$points` are guaranteed to be used. This allowed to pass arrays
with excess elements to draw polygons with less than three vertices.
While the current implementation of `gdImagePolygon()` and friends
would allow us to draw monogons and digons, we don't allow that
anymore, because the respective drawing primitives work slightly
different (e.g. drawing lines support anti-aliasing, but drawing
general polygons does not).
To minimize the BC break, we do not fix this longstanding issue for PHP
7, but target PHP 8 only.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
* PHP-7.4:
Add missing skip keyword in tests
Update NEWS for 7.4.0RC4
Update NEWS for PHP 7.4.0RC3
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Add missing skip keyword in tests
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* PHP-7.2:
Add missing skip keyword in tests
|
| | | | |
|
|\ \ \ \
| |/ / / |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Cf. <https://github.com/php/php-src/pull/4682>.
|