Commit Graph

22 Commits (8df65487ff0ba98771ed865be80a2d47c91fcc4b)

Author SHA1 Message Date
Mike Frysinger e1f02d2833 gd_intern: unify the min/max/clamp macros some more 2021-02-05 22:47:13 -05:00
willson-chen 4b0f372402 Fixed #369: fix new_a init error in gdImageConvolution() 2019-12-13 10:54:25 +01:00
Mike Frysinger fd06f7f83c clean up trailing whitespace/newlines
This is preparation for adding some linting checks for new commits from
people.  Shouldn't be any functional changes here (tests still pass!).
2018-06-21 22:47:42 -04:00
Christoph M. Becker a7a7ece43c Fix #386: gdImageGrayScale() may produce colors
We have to make sure to avoid alpha-blending issues by explicitly
switching to `gdEffectReplace` and to restore the old value afterwards.

We also document the algorithm used by `gdImageGrayScale()` and note
its limitations regarding palette images.
2017-08-27 12:57:03 +02:00
Christoph M. Becker 3e8b5c5ee2 Test and document some filter functions 2016-09-27 13:34:18 +02:00
Christoph M. Becker c1804def24 Mark up code examples with (start|end code)
This makes the code better readable in the sources, and we get syntax
highlighting in the generated HTML wherever we want it (i.e. not necessarily
always as with `-hl all`).
2016-08-23 22:27:27 +02:00
Christoph M. Becker b0333689ef Document all BGD_DECLARE'd functions
We add only minimal documentation comments for now, but at least that lets
Natural Docs add the function prototypes to the documentation.
2016-07-20 21:24:48 +02:00
David Chappelle 9ea30979a4 Prevent duplicate macro definition errors/warnings
It is the responsibility of the build infrastructure or user to set or
not set NDEBUG. For the time being this is a workaround in the case
where NDEBUG is set by the build infrastructure or user which prevents
the compiler from generating macro redefiniton warnings/errors. A longer
term fix will require changes to booststrap (aka configure) as well as
cmake (aka CMakeLists.txt).
2015-08-27 14:29:19 -04:00
Pierre Joye be907e0582 fix indent 2015-01-14 02:30:38 +01:00
Pierre Joye e8a1a4699a free coeffs 2015-01-07 06:32:19 +01:00
Chris Reuter 6febd903b6 Added a new Gaussian blur function.
gdImageCopyGaussianBlurred() returns a blurred copy of its argument.
Blurring is done in two passes to take advantage of the Gaussian
function's separability for.  This makes the algorithm much faster
than single-pass implementations, especially for larger radii.

This change also adds documentation for the new function and the
existing blur (gdImageGaussianBlur()).
2013-12-10 19:17:28 -05:00
Ondřej Surý c60d9fe577 Unify the Win32 check to _WIN32 check which is defined by both VC and MinGW 2013-04-23 06:03:59 +02:00
Ondřej Surý 3f2813e139 Fix type GD_STDCALL -> BGD_STDCALL 2013-04-23 05:39:28 +02:00
Ondřej Surý 173bd59082 Fix Win32 build regression and also fix Win32 static build in one go. Also define new BGD_STDCALL __stdcall on Win32 and use it in other source files. 2013-04-23 05:37:36 +02:00
Ondřej Surý cdea9eb0ad Remove extra # define BGD_DECLARE and simplify __stdcall non-usage on Linux 2013-04-14 08:58:34 +02:00
Ondřej Surý f52b1dd55d Fix config.h include before gd.h to get the HAVE_VISILIBITY symbol available 2013-04-12 15:01:43 +02:00
Ondřej Surý 15ea6bc5a1 Fix several uninitialized variable reads, dereferences before NULL checks, resource leaks and some other minor errors 2013-04-08 12:53:52 +02:00
Pierre Joye 0f0894a7dd - move pixelate filter to gd_filter.c 2013-04-05 07:50:25 +02:00
Pierre Joye d8e19af742 backport php's gd filter 2013-04-05 01:05:36 +02:00
Pierre Joye 46cc7836b3 fix build and remove confusing macros 2013-04-04 02:16:28 +02:00
tabe 960dc0df09 proper declarations, especially for MinGW 2011-06-17 15:58:47 +09:00
tabe 9563181569 adapted Kalle's scatter filter. see FS#208 2009-09-20 10:47:28 +09:00