Mike Frysinger
bf36fa539b
use https://libgd.org
2021-07-05 23:59:35 -04:00
Christoph M. Becker
5b63349b82
Fix #679 : ssize_t used in gdft.c won't compile under MS compiler
...
MSVC does not define `ssize_t` (nor `SSIZE_MAX`), so we add fallback
definitions to the generated config.h.
We also need to define `HAVE_CONFIG_H` which makes most of the other
defines there superfluous, but we leave them in since they don't hurt.
2021-03-16 12:22:00 -04:00
Ben Morss
f2aa2836ed
AVIF support ( #671 )
...
Demand for AVIF support on the web is growing, as the word gets out
about this new file format which allows higher-quality encoding at
smaller sizes. Core contributors to major open-source CMSs are
interested in auto-generating AVIF images! They've been simply
waiting for support to appear in libgd.
This PR aims to meet the growing demand, and to help bring smaller,
more beautiful images to more of the web - to sites created by
experienced developers and CMS users alike.
This PR adds support by incorporating libavif in addition to the
existing libheif support. It's generally felt that libavif has
more complete support for the AVIF format. libavif is also used
by the Chromium project and squoosh.app.
In this PR, I've endeavored to incorporate the latest research into
best practices for AVIF encoding - not just for default quantizer
values, but also an algorithm for determining the number of
horizontal tiles, vertical tiles, and threads.
Fixes #557 .
2021-03-03 21:35:56 -05:00
Martin Reboredo
39c4644fa0
HEIF support through libheif ( #670 )
...
With the adoption of AVIF by Firefox and Chromium based browsers (still
in experimental phase), the newer incorporation of HEIF by Canon and Sony
in their cameras and the newer support of both of them in modern software
like ImageMagick, GIMP and Krita, `gd` haven't seen any endorsement for
the formats up until this PR.
Reading and writing is done by `libheif`, with functionality for chroma
subsampling (for now `4:2:0`, `4:2:2` and `4:4:4`), quality (with new
`200` for lossless) and compression (whether `HEVC` or `AV1`) selection.
This was tested with `libheif` version `1.11.0` in my Solus machine.
Also, fixes both #395 and #557 .
2021-03-02 12:32:03 -05:00
Mike Frysinger
c46a331f88
a few more shellcheck fixes
2021-02-08 18:18:27 -05:00
Mike Frysinger
c75db8d082
scripts: clean up various shellcheck warnings
...
Should hopefully not break anything :).
2021-02-08 18:10:51 -05:00
willson-chen
eec2c48443
Define HAVE_SYS_STAT_H in msys
2019-10-28 03:09:49 -04:00
willson-chen
c12ce7f474
windows: run_tests: avoid running fontconfig & xpm
2019-10-28 03:09:24 -04:00
willson-chen
4d7b598863
windows/msys/run_tests.sh: skip fontconfig and xpm test cases
...
libxpm and libfontconfig are unavaible in windows. So skip fontconfig and xpm test cases by excluding their test path
2019-10-09 23:51:35 -07:00
willson-chen
84c49063f9
windows/msys/Mkefile: add gd formats option
...
This fixes 'gd image support has been disabled' in test cases of operating gd image, like gd/gd_im2im.c.
2019-10-09 23:50:51 -07:00
willson-chen
619e71501e
Update msys readme
...
Fixes #518 .
2019-10-09 23:49:20 -07:00
Peter Kokot
434b639d53
Add leading blank lines check and trim redundant blank newlines
2018-10-05 10:27:50 -04:00
Peter Kokot
5dc2dd8b49
Remove HAVE_STDLIB_H
...
The C89 and later standard defines the `<stdlib.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STDLIB_H` symbol can be removed.
Also Autoconf suggests doing this and relying on C89 or above [2] and [3].
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-08 03:29:27 -04:00
Peter Kokot
486467fc8f
Remove HAVE_STDDEF_H
...
The `<stddef.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to manually check if header is
present anymore.
Since the libgd requires at least C89 or greater, the `HAVE_STDDEF_H`
symbol defined by Autoconf in configure.ac [2], and Cmake build system
files can be removed and simplifed.
Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-06 02:04:22 -04:00
Peter Kokot
d81a1383d7
Remove HAVE_LIMITS_H
...
The `<limits.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to manually check if header is
present anymore.
Since the libgd requires at least C89 or greater, the `HAVE_LIMITS_H`
symbol defined by Autoconf in configure.ac [2], and Cmake build system
files can be removed and simplifed.
Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-06 00:30:15 -04:00
Peter Kokot
1e7f93922f
Remove HAVE_ERRNO_H
...
The `<errno.h>` header file is part of the standard C89 headers [1] and
on older systems there needed to be also a manual check if header is
present.
Since libgd requires at least C89 or greater, the `HAVE_ERRNO_H`
symbol defined by Autoconf in configure.ac [2], and Cmake build system
files can be removed and simplifed.
Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.3
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-05 01:39:49 -04:00
Peter Kokot
01c59d840b
Remove Git ident attributes
...
Git ident attributes were in most cases utilized with SVN and keywords
substitutions, where $Id$ were replaced with certain revision from the
repository. In Git this functionality is different. Each $Id$ needs to
be defined in .gitattributes file to be effective. This patch removes
unused and outdated attributes.
2018-06-27 02:04:37 +02: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
Mike Frysinger
aac77143dd
convert all files to native line encodings
...
A bunch of these files were committed with Windows line encodings.
Strip all those ^M gremlins out as people working on Windows can
use git's autocrlf setting to convert back and forth as needed.
2018-06-21 21:44:54 -04:00
Christoph M. Becker
d9157ebb08
Enable GD and GD2 formats for native Windows toolchain
...
Actually, this should be configurable, but we're sticking with the
hard-coded defaults for now.
2018-04-05 16:47:18 +02:00
Christoph M. Becker
b7977b574d
Add support for building the programs with MSVC
...
We add support for building all executable programs in `src/` to the
native MSVC build script, except for `webpng.exe` due to #401 .
2017-08-24 15:56:33 +02:00
Christoph M. Becker
1f136c5f16
Add test summary for Windows
2017-01-25 13:37:39 +01:00
Christoph M. Becker
be5a6457a8
Enable libtiff support on Windows
2017-01-25 12:58:28 +01:00
Christoph M. Becker
5580322ec9
Update Windows build instructions
2017-01-25 12:49:37 +01:00
Christoph M. Becker
73aec753f5
Markup windows/readme.md
2017-01-20 19:49:17 +01:00
Christoph M. Becker
d225bb5c23
Exclude tests/fontconfig/ on Windows
...
We don't support libfontconfig on Windows, so it doesn't make sense to
build the fontconfig related test cases, as they are supposed to fail
anyway.
2017-01-20 18:21:19 +01:00
Christoph M. Becker
353d07a62c
Enable working debug builds
...
For now, we're supporting PDBs for libgd.dll and the test executables.
2017-01-20 17:30:53 +01:00
Christoph M. Becker
5b83c07172
Purge duplicate make rules
2017-01-20 13:08:14 +01:00
Christoph M. Becker
971d1ff169
Exclude tests/tiff/ on Windows
...
Currently, we don't support libtiff on Windows, so it doesn't make
sense to try to build the TIFF related test cases.
2017-01-19 23:58:37 +01:00
Christoph M. Becker
59ea5748e9
Be more resilient wrt. the freetype headers
...
In recent dependency builds ft2build.h is placed in freetype2/ instead
of freetype/, so we add this folder to the include path.
2017-01-19 20:16:34 +01:00
Christoph M. Becker
8ca157f67e
No, we don't HAVE_BUNDLED_GD
...
This is obviously a relict of PHP's bundled libgd, which we should remove.
And actually, the #ifdef isn't necessary anymore for PHP's bundled libgd
either, because it supports gdImageAlphaBlending().
2016-09-14 20:10:29 +02:00
Pierre Joye
e7fa298f5e
#241 do no redifine it if already defined (ie command line)
2016-07-24 02:39:33 +07:00
Pierre Joye
b0f7ff43ac
have to create them before or include cannot be done conditionally, sadly
2016-07-24 02:32:47 +07:00
Pierre Joye
2d1d3a0b2f
generate config.h
2016-07-23 23:00:10 +07:00
Pierre Joye
9849575222
#249 be sure to create tests dir and make gd DLL available for tests
2016-07-23 19:05:54 +07:00
Pierre Joye
9bb974cd0a
sync windows test build, remove test_config.h
2016-07-23 15:43:37 +07:00
Pierre Joye
bbb5939f65
not used anymore
2016-07-17 19:08:31 +07:00
Pierre Joye
f91a238fc7
skip gdtest folder
2016-07-17 16:05:58 +07:00
Pierre Joye
9d0947775f
mising file
2016-07-15 11:53:16 +07:00
Pierre Joye
2038d21a11
not used anymore
2016-07-15 11:40:39 +07:00
Pierre Joye
cd53fe54ca
add webp to the build, generate tests list to run
2016-07-15 11:34:48 +07:00
Pierre Joye
09f5c04497
generate the list of tests and makefile instead of using static outdated list
2016-07-15 10:26:21 +07:00
Pierre Joye
2ce49c730e
remove useless echo
2016-07-14 09:17:03 +07:00
Pierre Joye
26122f1b4c
add DEBUG mode
2016-07-12 20:47:46 +07:00
Pierre Joye
1cec6ea1d7
fix build and run tests
2016-07-12 12:50:27 +07:00
Pierre Joye
6a38e1bda2
add readdir
2016-07-11 17:13:52 +07:00
Pierre Joye
705e29a450
#249 add some missing files
2016-07-11 02:21:18 +07:00
Pierre Joye
f3d82b237a
#249 first set of fixes, now builds with nmake and ../deps, more to fix
2016-07-11 01:27:56 +07:00
Mike Frysinger
1239832a09
configure/cmake: unify header checks and config.h generation
...
Rather than hand maintain config.h.cmake (which is already out of date),
re-use the autogenerated config.h from autoheader.
2016-05-17 23:06:14 -04:00
Mike Frysinger
ac527e646e
delete webpimg.c references
...
This code was purged w/libvpx recently.
2015-04-11 16:25:49 -04:00