summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd.h
Commit message (Collapse)AuthorAgeFilesLines
* Support TGA readingChristoph M. Becker2019-06-201-0/+4
| | | | | | | | | | | 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.
* Implemented the gdScatter filter I wrote almost 10 years agoKalle Sommer Nielsen2019-05-101-0/+12
| | | | | | | | | | | | | | | | | | | 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.
* Remove HAVE_SYS_VARARGS_HPeter Kokot2018-09-161-11/+1
| | | | | | | | | | | 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
* Remove unused functionChristoph M. Becker2018-02-091-2/+0
|
* Fix #74744: gd.h: stdarg.h include missing for va_list use in gdErrorMethodChristoph M. Becker2017-06-111-0/+12
|
* Merge branch 'PHP-7.1'Christoph M. Becker2017-01-101-2/+0
|\ | | | | | | | | | | | | | | * PHP-7.1: Fix #73893: A hidden danger of death cycle in a function of gd # Conflicts: # ext/gd/libgd/gd_rotate.c
| * Fix #73893: A hidden danger of death cycle in a function of gdChristoph M. Becker2017-01-101-2/+0
| | | | | | | | We remove the unused, but potentially dangerous functions.
* | Implement #69606: Support BMPs (added in GD 2.1.0)Christoph M. Becker2017-01-041-0/+9
| | | | | | | | | | | | | | | | 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.
* | Merge branch 'pull-request/2151'Christoph M. Becker2016-10-171-0/+1
|\ \
| * | Implement request #33066: Add GD Image Function gdImageOpenPolygon()Christoph M. Becker2016-10-021-0/+1
| | | | | | | | | | | | | | | | | | 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.
* | | Unify error handling of bundled and external libgdChristoph M. Becker2016-10-071-4/+4
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Change gdImageTrueColorToPalette() to return success/failureChristoph M. Becker2016-10-031-1/+1
|/ / | | | | | | | | | | | | | | 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.
* | Add support for gdEffectMultiplyChristoph M. Becker2016-10-021-0/+3
| | | | | | | | | | | | | | 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.
* | Switch to libgd anti-aliased drawing APIChristoph M. Becker2016-10-021-2/+0
| | | | | | | | | | | | 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.
* | Remove further remains of the old antialiasing supportChristoph M. Becker2016-09-301-15/+2
| | | | | | | | | | | | 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.
* | Port variable image resolution support from libgd 2.1.0Christoph M. Becker2016-09-191-0/+5
|/ | | | The PHP binding for this feature will be submitted as a separate PR.
* trailing whitespace removalStanislav Malyshev2015-01-101-1/+1
|
* typo fixes - https://github.com/vlajos/misspell_fixerVeres Lajos2014-11-231-1/+1
|
* imagettftext() uses the last charactermap it found and not the one you wantScott MacVicar2014-02-161-1/+2
| | | | | | | | | | | | 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
* Merge branch 'PHP-5.5'Remi Collet2013-04-251-0/+2
|\ | | | | | | | | * PHP-5.5: Fixed bug #64707 missing declaration after dd0399f
| * Fixed bug #64707 missing declaration after dd0399fRemi Collet2013-04-251-0/+2
| |
* | Merge branch 'PHP-5.5'Remi Collet2013-04-241-2/+4
|\ \ | |/ | | | | | | | | * PHP-5.5: We need both gdImageCreateFromJpeg* and gdImageCreateFromJpeg*Ex gd: fix proto comment
| * We need both gdImageCreateFromJpeg* and gdImageCreateFromJpeg*ExRemi Collet2013-04-241-2/+4
| | | | | | | | | | | | | | 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.
* | conflictPierre Joye2013-03-261-0/+1
|\ \ | |/
| * fix regression, take #2 (merge issue due to git 1.8 default setting changes)Pierre Joye2013-03-261-0/+1
| |
* | - fix regression bug24155.phpt and bug39366.phptPierre Joye2013-03-221-2/+1
|/
* - add affine matrix helper for translate, scale, rotate and shearPierre Joye2013-03-201-0/+10
|
* - add new interpolation methodPierre Joye2013-03-201-1/+129
| | | | | | | | | . 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
* - clean and enable thresholdPierre Joye2013-02-281-1/+2
|
* - add image crop supportPierre Joye2013-02-281-0/+50
|
* - add image flip API supportPierre Joye2013-02-271-0/+8
|
* - initial webp support, rely on libpx, final version will be either w/o dep ↵Pierre Joye2010-10-041-0/+5
| | | | or using libwebp (to be released by g)
* - expose gdImageGetTrueColorPixel in bundled libPierre Joye2009-05-261-0/+1
| | | | | - fix bundled lib build
* - silent warning or possible linker error on winPierre Joye2009-04-071-0/+4
|
* MFH: added pixelate filter.Takeshi Abe2009-01-141-0/+7
|
* - fix build on linux (static)Pierre Joye2008-11-061-0/+2
| | | | | | - add gd[Format]Version[Int|String] first methods to work around the png header issues
* MFH: Fixed function definitionIlia Alshanetsky2007-09-111-1/+1
|
* - MFH: @DOC add constants GD_MAJOR_VERSION, GD_MINOR_VERSION, GD_RELEASE_VERSIONPierre Joye2007-06-031-0/+6
| | | | | GD_EXTRA_VERSION and GD_VERSION_STRING
* MFH: Fixed bug #40130 (TTF usage doesn't work properly under Netware).Scott MacVicar2007-04-231-5/+9
|
* - MFH:Pierre Joye2007-04-041-0/+8
| | | | | | | | - 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.
* fix compiler warnings introduced in my previous commitNuno Lopes2006-09-161-1/+1
|
* mark some huge arrays as read-onlyNuno Lopes2006-09-151-1/+1
|
* - MFH: add a weak/tolerant mode to the jpeg loaderPierre Joye2006-02-051-2/+2
|
* - MFH: add filter option to imagepngPierre Joye2006-01-271-3/+3
| | | | | | - add constants PS: If someone can check why #include "png.h" fails, it will be cleaner
* -fix build as shared or separate from main build (bfrance)Pierre Joye2005-10-091-0/+4
|
* - allow to keep or ignore the transparent color in imagerotate (thxPierre Joye2005-03-271-5/+5
| | | | | | | Ken Coar to report this "bug") - be sure to restore alphablending in imagefill - use zend_parse_parameter in imagerotate
* Move global symbols defined by bundled copy of libgd into privateJoe Orton2004-08-311-0/+2
| | | | | | php_gd_* namespace, to avoid symbol conflicts with, for instance, another Apache module which loads a different copy of libgd.
* Merge changes from GD 2.0.28Stefan Esser2004-07-221-0/+5
|
* Missing part of the upgrade patch.Ilia Alshanetsky2004-05-101-0/+3
|
* - Add fontpath for win98/XP (Patch by Friedhelm Betz)Derick Rethans2004-04-121-1/+1
|