Commit Graph

2023 Commits (e1f02d2833a7de496e4c148206f421cd664f0d56)

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
Mike Frysinger f538eedc7c gd_filename: constify & localize more
Mark the data structures & functions as const & static when possible,
and punt the unused FType enum.
2021-02-05 00:45:55 -05:00
Mike Frysinger 4690d1ceb6 gitignore: update Windows tools 2021-02-02 21:59:15 -05:00
WilliamHeaven 4dd5f43bc6 Fix copyright format problem 2021-02-01 22:39:33 -05:00
wilson chen 75ef79c9b0
release-2.3.1 (#668) 2021-01-30 15:16:05 +08:00
Mike Frysinger fb33294724 webp: support pkg-config file 2021-01-20 15:17:14 -05:00
Mike Frysinger 82b08997c1 gd_io: replace internal Putchar with gdPutC
Most code is already using gdPutC instead of Putchar -- only the bmp
module is using Putchar.  It's unclear why we have this other form as
they should be equivalent: gdPutC takes an unsigned char (8-bits) and
then calls ctx->putC while Putchar takes a signed int, masks it with
0xff, and then calls ctx->putC.

The history of these funcs goes back to when it's initially imported
as part of the 1.5.0 release, and there doesn't seem to be any notes
as to why.

So change bmp to use gdPutC so we can delete Putchar entirely.  The
function isn't exported so no one should even notice.  Our tests are
still passing, so hopefully that provide good coverage.
2021-01-11 19:15:17 -05:00
Mike Frysinger 8d63967a52 gd_io: trim unused Putword function 2021-01-11 18:53:50 -05:00
Christoph M. Becker 9ed642764c Fix potential integer overflow detected by oss-fuzz 2020-08-24 17:03:07 +02:00
Remi Collet 0be6aec0fe Fix #615 using libraqm
and avoid unneeded free
2020-07-15 09:45:07 +02:00
wilson chen 28ecfe77c8
fix #303: gdlib.pc: use Requires instead of Libs (#537) 2020-06-18 14:55:32 +08:00
wilson chen 93f42630f4
.travis.yml: close config warning and info (#642)
* sudo is deprecated and has no effect anymore
* add dist to specify xenial explicitl
2020-05-28 14:58:44 +08:00
willson-chen 7a73f68401 travis/main.sh: fix indent error 2020-05-22 23:17:23 +08:00
wilson chen bc658270f5
tests/gdimageline/gdimageline_bug5: add im null judgement (#624)
gdImageCreate returns NULL in gdimageline_bug5.c on AIX, which make the judgement necessary in case of segment fault.
2020-05-20 19:29:23 +08:00
wilson chen 43df499f1f
Update travis/main.sh (#640)
* Use 'if [[ ]]' instead of 'if [ ]'
* Append args to cmake_args by '+='
2020-05-20 00:09:53 +08:00
Marek Skalický 4abc26cca6
Compute average in gdGuessBackgroundColorFromCorners properly (#483) 2020-05-13 19:19:08 +08:00
wilson chen 450fd2e843
Fixed #472: Adjusting CMakeLists.txt (#582)
Add REQUIRED to FIND_PACKAGE
2020-05-10 22:41:14 +08:00
willson-chen 2ba27b5db3 Add REQUIRED to FIND_PACKAGE(ZLIB) 2020-05-07 23:55:01 -04:00
willson-chen 78b1f2bdf3 CMakeLists.txt: zlib is enabled implicitly
zlib is enabled only when ENABLE_PNG or ENABLE_GD_FORMATS is on.
2020-05-07 23:55:01 -04:00
willson-chen 7cb597af4a travis/main.sh: delete option ENABLE_ZLIB in build_cmake() 2020-05-07 23:55:01 -04:00
Christoph M. Becker 3dd0e308cb
Fix #615: gdImageStringFT() fails for empty strings as of libgd 2.3.0 (#633)
We change the return type of `textLayout()` to `ssize_t`, and signal
failure by returning `-1`, so that laying out an empty string is no
longer handled as failure.  We make sure that no overflow occurs,
assuming that all `int` values can be fully represented as `ssize_t`.
2020-05-05 18:02:45 +08:00
wilson chen 188aa091e1
README.md: add some libraries info (#631)
Add some information of libraries depended by GD. Add a note to GD user about the license of libimagequant.
2020-04-29 12:00:49 -04:00
Remi Collet d3185dcfb6 fix typo but preserve BC 2020-04-15 09:11:01 +02:00
wilson chen ec0b439769
Improve test cases for gdImageString16 and gdImageStringUp16 (#625)
Fixed #623. wchar_t is 32 bits on 64-bits AIX, which will result in test case failure.
So we replace wchar_t with unsigned short array.
2020-04-15 00:25:01 +08:00
wilson chen da50dce3ba
src/config.h.cmake: replace #cmakedefine01 with #define in macro ENABLE_GD_FOORMATS (#622)
Although we have a document describ the avaiable options
are ENABLE_XXX=1/0, there must some one are familar with
ENABLE_XXX=ON/OF.  If ENABLE_GD_FORMATS=ON is used, it will
result that GD formats is not enabled actually.
2020-04-14 23:30:18 +08:00
wilson chen 1860547cf0
Fixed test case build configure error in issue #626 2020-04-13 15:09:51 +08:00
Rosen Penev c494fb788e gdlib.pc: use prefixes for pkgconfig file
This allows the pkgconfig file to be properly used in cross compile
scenarios by overriding the prefix. Otherwise, it points to host
libraries.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-06 09:06:13 -04:00
wilson chen b6b6e69363
tests/gdtest/CMakeLists.txt: include readdir.c under win (#520)
@pierrejoye has implemented opendir, closedir and readdir in readdir.c, which is only used under windows platform. These functions are enabled by modifiying the tests/gdTest/CMakeLists.txt
2020-04-01 23:22:21 +08:00
Rosen Penev f437a2243e
cmake: remove required host includes (#617)
This breaks cross-compilation. More info:
https://github.com/openwrt/packages/pull/10079
2020-03-31 19:22:39 +08:00
wilson chen aa90da2db1
Fix two build configure errors in tests (#616)
tests/webp/bug_double_free should depend on webp and jpeg.
tests/gdimagesquaretocircle should depend on png.
2020-03-28 22:29:35 +08:00
wilson chen c2a2947675
VMS/README.VMS: Add dropping support information (#614) 2020-03-26 23:43:03 +08:00
willson-chen ce00fbff0e Move initial declaration out of `for` loop
'for' loop initial declarations are only allowed in C99 mode.
2020-03-25 11:41:44 +08:00
Remi Collet 635dd9a306 distribute getlib.sh 2020-03-24 08:01:01 +01:00
Benjamin Kramer 3d2bd757f0
Make gd_nnquant.c less likely to introduce duplicate definitions (#601)
This file contains some accidentally global symbols with generic names.
Give them internal linkage (or remove if unused) to avoid conflicts when
linking another library that happens to use the same generic names.
2020-03-23 23:25:24 +08:00
willson-chen b079fa0622 Update CODE_OF_CONDUCT.md 2020-03-22 21:40:02 +08:00
willson-chen 07d83b11a1 CHANGELOG.md: Update release date 2020-03-22 21:40:02 +08:00
willson-chen 3b38ad28fd src/gd.h: Update version 2020-03-22 21:40:02 +08:00
willson-chen bca47f5fdc Makefile.am: Add CHANGELOG.md CONTRIBUTING.md 2020-03-22 21:40:02 +08:00
willson-chen 5c7bfa8d3f Update CHNAGELOG.md 2020-03-22 21:40:02 +08:00
Ondřej Surý 1d679baadf Add http://keepachangelog.com/ based changelog for 2.2.4 (MarkDown based) 2020-03-22 21:40:02 +08:00
Pierre Joye 638946354e add CoC 2020-03-22 21:40:02 +08:00
wilson chen ecd68e478a
Fix #607: Add gdlib.pc.cmake to config/Makefile.am 2020-03-22 17:31:55 +08:00
Kleber Tarcísio 954f427ea9 gdcache: fix main function error
First argument of ‘main’ should be ‘int’.
2020-03-21 21:31:48 +08:00
wilson chen 3f50ffaefd
Fixed #596: gdTransformAffineCopy run error
And add test case for it.
2020-03-21 15:31:40 +08:00
wilson chen 08238a0ac2 Fix some memory leakage in test cases
Fix the memory leakage in following test cases: tests/bug_overflow_lagre_new_size.c, tests/gdimagecrop/bug00486.c, tests/bmp/bug00450.c
2020-03-21 10:59:33 +08:00
wilson chen a48dbca620
tests/gif/bug00006.c: fix memory leakage 2020-03-17 23:19:30 +08:00
wilson chen de68959bb2
docs/README.CMAKE: add some options 2020-03-13 23:38:23 +08:00
wilson chen aa21ec9a61
add testcase for gdimagesquaretocircle() 2020-03-08 19:57:34 +08:00
wilson chen cc02e8878d
Add testcase for gdimagecompare() 2020-03-07 23:17:40 +08:00
wilson chen 7d90042437
Fix #597: add codecov support
1. travis/main.sh: generate code coverage report and submit to codecov.io
2. README.md: add codecov.io token
2020-03-01 16:49:39 +08:00