| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
Outdated systems used to provide the `<varargs.h>` and in case of PHP
`<sys/varargs.h>`. [1]
Current systems have `<stdarg.h>` which is also a C89 standard header
and systems have it always present. [2]
[1] https://en.wikipedia.org/wiki/Stdarg.h#varargs.h
[2] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
* PHP-7.1:
Fix #73893: A hidden danger of death cycle in a function of gd
# Conflicts:
# ext/gd/libgd/gd_rotate.c
|
| |
| |
| |
| | |
We remove the unused, but potentially dangerous functions.
|
| |
| |
| |
| |
| |
| |
| |
| | |
We add PHP bindings for libgd's features to read and write BMP 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.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
We're porting the relevant changes from
<https://github.com/libgd/libgd/commit/34a00a40>.
We also check the return value in the PHP binding, and throw E_WARNING if
the conversion failed.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
Curiously, while the external GD claims "just a few vestiges after switching
to the fast, memory-cheap implementation from PHP-gd", that stuff was still
in the bundled GD.
|
|/
|
|
| |
The PHP binding for this feature will be submitted as a separate PR.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This caused issues when you picked a font with multiple maps, it wouldn't
pick the unicode version but instead pick the last one it saw. Change so
we cache on a per encoding level. There was even a todo list item in the code.
In an ideal world we can probably iterate through at font write time.
Test Plan:
See said unit test, it's Apache Licensed font included
|
|\
| |
| |
| |
| | |
* PHP-5.5:
Fixed bug #64707 missing declaration after dd0399f
|
| | |
|
|\ \
| |/
| |
| |
| |
| | |
* PHP-5.5:
We need both gdImageCreateFromJpeg* and gdImageCreateFromJpeg*Ex
gd: fix proto comment
|
| |
| |
| |
| |
| |
| |
| | |
The new (Ex) functions are used with the new ignore_warning parameter
The standard functions are used in _php_image_create_from_string,
sent as a function pointer, and call without this optional parameter.
|
|\ \
| |/ |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
. imagescale
. imageaffine
. replace imagerotate with new generic and optimized new implementations
. imagesetinterpolationmethod, to set the default interpolation to be
used with the new functions
. add imagepalettetotruecolor
|
| |
|
| |
|
| |
|
|
|
|
| |
or using libwebp (to be released by g)
|
|
|
|
|
| |
- fix bundled lib build
|
| |
|
| |
|
|
|
|
|
|
| |
- add gd[Format]Version[Int|String] first methods to work around the png
header issues
|
| |
|
|
|
|
|
| |
GD_EXTRA_VERSION and GD_VERSION_STRING
|
| |
|
|
|
|
|
|
|
|
| |
- remove double lock (tween colors cache is created in each thread, the
cache mutex is already locked earlier)
- #40858, other TS improvements for gd freetype cache management
cache initialization and shutdown is now done in MINIT and MSHUTDOWN.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- add constants
PS: If someone can check why #include "png.h" fails, it will be cleaner
|
| |
|
|
|
|
|
|
|
| |
Ken Coar to report this "bug")
- be sure to restore alphablending in imagefill
- use zend_parse_parameter in imagerotate
|
|
|
|
|
|
| |
php_gd_* namespace, to avoid symbol conflicts with, for instance,
another Apache module which loads a different copy of libgd.
|
| |
|
| |
|
| |
|