1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Commit Graph

65 Commits

Author SHA1 Message Date
Christoph M. Becker 885f935090 Merge branch 'PHP-8.1'
* PHP-8.1:
  "Export" relevant GD macros
2021-11-24 18:26:15 +01:00
Christoph M. Becker a2c0ffb54e Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  "Export" relevant GD macros
2021-11-24 18:25:21 +01:00
Christoph M. Becker 9237055141 "Export" relevant GD macros
For parity with non Windows systems, we should `AC_DEFINE` these macros
so that they are defined in config.w32.h instead of directly passed to
the compiler.  This allows extensions which have ext/gd as dependency
to check for these macros.  E.g. ext/ps does this[1], and fails to
build on Windows, because `HAVE_GD_BUNDLED` isn't defined.

[1] <https://github.com/steinm/ps/blob/RELEASE_1_4_4/ps.c#L34>

Closes GH-7680.
2021-11-24 18:23:28 +01:00
Christoph M. Becker 243966177e Use the standard _WIN32 instead of the custom MSWIN32 in libgd
We're already checking `_WIN32` elsewhere in our bundled libgd, so it
makes no sense to also have a custom `MSWIN32`.

Closes GH-7682.
2021-11-24 15:38:28 +01:00
Christoph M. Becker 7738d8dd02 Drop unused GD defines
These are not used in the bundled libgd, and not used in config.m4
either.

Closes GH-7681.
2021-11-24 15:31:24 +01:00
Jan-E 0c89edac3a Windows: allow GD ext without avif.dll
Closes GH-7200.
2021-06-30 23:01:09 +02:00
Ben Morss 81f6d36c90 Add avif support to ext/gd
This backports avif support from upstream libgd into bundled libgd
and exposes the functionality through new imagecreatefromavif()
and imageavif() functions.

Closes GH-7026.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-06-10 12:32:30 +02:00
Christoph M. Becker 340e2ead77 Export php_gd_libgdimageptr_from_zval_p()
Some extension may need to retrieve the `gdImagePtr` from an `GdImage`
object; thus, we export the respective function.  To not being forced
to include gd.h in php_gd.h, we use the opaque `struct gdImageStruct *`
as return type.

We also rename php_gd2.dll to php_gd.dll, since there's not really much
point in giving the DLL a version number, since there is no php_gd.dll
for years (if there ever has been).  Renaming, on the other hand,
matches the name on other systems (gd.so), and allows to actually use
`ADD_EXTENSION_DEP()`.
2020-07-11 19:33:20 +02:00
Christoph M. Becker 03bd4333f6 Add imagegetinterpolation()
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.
2020-01-14 18:25:27 +01: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
Peter Kokot 37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot 8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Christoph M. Becker 500b496f8e Implement #69606: Support BMPs (added in GD 2.1.0)
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.
2017-01-04 14:55:02 +01:00
Anatol Belski 56ff613974 Merge branch 'PHP-7.1'
* PHP-7.1:
  Add an include path for freetype which is relevant for cmake builds
2016-09-25 20:58:09 +02:00
Anatol Belski 4e7b5ca459 Add an include path for freetype which is relevant for cmake builds 2016-09-25 20:55:13 +02:00
Christoph M. Becker be30c34fb8 Sync with libgd wrt. compilation units
* integrate gd_arc.c into gd.c (as of gd-2.1.0-alpha1)
 * rename gd_color.c to gd_color_match.c (as of gd-2.1.0-alpha1)
 * remove mathmake.c (as of GD_2_0_34RC1)
 * rename xbm.c to gd_xbm.c (as of gd-2.1.0-alpha1)
2016-09-20 00:34:19 +02:00
Christoph M. Becker a14c220fd9 Remove unused compilation unit
gd_arc_f_buggy.c has already been removed in GD 2.0.34RC, so we're also
getting rid of the file.
2016-09-19 23:48:23 +02:00
Christoph M. Becker 494c5dc77a Remove effectless --enable-gd-native-ttf and USE_GD_IMGSTRTTF
--enable-gd-native-ttf did set USE_GD_IMGSTRTTF, which is otherwise unused
as of commit 8a90aad3 (i.e. PHP 5.5.0), at least.
2016-09-14 01:01:19 +02:00
Anatol Belski bf1ecbfe16 fix libwebp namings 2015-07-24 17:06:29 +02:00
Anatol Belski 084a6e43cd enable ext/gd to support libpng16 2015-07-23 16:10:07 +02:00
Christoph M. Becker 00ba7e6215 Replaced libvpx by libwebp (first draft; Windows only)
ext/gd/libgd/gd_webp.c has been taken from libgd[1]. Mainly, gd_error(X) has
been subsituted by zend_error(E_ERROR, X) and BGD_DECLARE(X) by X. Further
modifications are obvious from the diff.

All GD tests are passing, what raises hope, but we need more WebP tests,
anyway.

[1] <https://github.com/libgd/libgd/blob/7ec030c4f1dae75ed5d82c3eed2abe6775742c75/src/gd_webp.c>
2015-07-21 10:37:06 +02:00
Kalle Sommer Nielsen 7dcfdbbee4 Remove T1Lib support (see #69698)
# Also removes imagepscopyfont() which was never available (commented out)
2015-05-29 09:18:36 +02:00
Anatol Belski af7e3064f3 rename intel toolset to icc - shorter 2014-11-07 19:24:17 +01:00
Anatol Belski 7d7182e1b0 fix gd compilation with icc toolset 2014-11-07 19:13:41 +01:00
Anatol Belski 75486555c2 fix include search 2014-03-12 19:25:20 +01:00
Anatol Belski 082ee90b9b fixe preprocessor definition 2013-05-15 14:24:21 +02:00
Pierre Joye 22159fb7b7 - add new interpolation method
. 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
2013-03-20 07:46:59 +01:00
Pierre Joye a991360344 - add image crop support 2013-02-28 17:24:23 +01:00
Pierre Joye efffdb4d7f - add only once 2013-02-27 16:03:17 +01:00
Pierre Joye 6a3623e199 - add image flip API support 2013-02-27 10:38:33 +01:00
Anatoliy Belsky 215da6057f make libvpx optional 2013-02-06 16:22:27 +01:00
Anatoliy Belsky 263a220997 allow for libpng 1.5.x 2013-01-28 13:23:31 +01:00
Anatoliy Belsky e3ac418309 enabled libxpm for gd on windows 2012-10-24 10:36:52 +02:00
Pierre Joye a7ffa09e18 - add PHP_INSTALL_HEADERS to all parts (core&exts) exposing headers, generate the install-headers cmd 2010-12-11 22:18:10 +00:00
Pierre Joye cccc349aa5 - initial webp support, rely on libpx, final version will be either w/o dep or using libwebp (to be released by g) 2010-10-04 22:30:35 +00:00
Pierre Joye f62f88cb76 - typo for iconv DLL .lib 2010-06-28 23:26:48 +00:00
Pierre Joye f726afbfeb - [DOC] always enable imagecolormatch 2009-05-27 08:18:24 +00:00
Pierre Joye 59ec80c572 - MFH: [DOC] always enable imagerotate (bundled or system gd) 2009-05-27 07:18:05 +00:00
Pierre Joye a008f130cd - MFH: [DOC] - add image(filled)ellipse to the compat layer (work around a bug in debian too, function is declared but not present in the lib...) 2009-05-26 20:14:31 +00:00
Pierre Joye b682f42915 - [DOC] always enable imagefilter and imageconvolution, even when built against system's gd 2009-05-26 12:50:40 +00:00
Pierre Joye 63169ea0b2 - naming & cleanup 2009-04-06 09:39:02 +00:00
Pierre Joye 1fcabf75fe - check in the libpng dir as well 2009-03-29 14:01:56 +00:00
Takeshi Abe 40d3b2f7f3 MFH: added pixelate filter. 2009-01-14 19:06:12 +00:00
Kalle Sommer Nielsen c9be725fd8 MFH + NEWS entry 2008-07-20 19:03:18 +00:00
Scott MacVicar 62de800b36 Remove freetype1 support 2008-07-18 01:16:25 +00:00
Rob Richards 58c300ddf6 dont forget the header 2008-07-11 15:05:05 +00:00
Rob Richards 848c7196f4 fix iconv linking 2008-07-11 14:41:06 +00:00
Rob Richards e83274cd16 fix zlib detection and linking 2008-07-09 16:09:35 +00:00
Pierre Joye 0ca3ffeda3 MFH:
- use _a for static lib
 - fix logic for shared zlib
2008-07-08 19:09:11 +00:00
Pierre Joye ce7428d9d9 - test for ZLIB_SHARED (possible conflict) 2008-07-07 08:41:10 +00:00