Commit Graph

28 Commits (master)

Author SHA1 Message Date
Pierre Joye 86a9e24510 Add ENABLE_CPP_API 2021-08-23 22:55:56 +07: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 34048f3dac regen config.h.cmake to include new symbols 2021-02-20 03:08:39 -05: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
Christoph M. Becker a702897fb2 Revert accidential changes to config.h.cmake
These happened with commit 9088591eae.
2020-01-06 09:45:37 +01:00
Christoph M. Becker 9088591eae Fix #585: gdTransformAffineCopy() changes interpolation method
We have to properly initialize `interpolation_id_bak`.
2020-01-04 23:43:47 +01: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 5fa75ace15 Remove HAVE_STRING_H
The C89 and later standard defines the `<string.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STRING_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:16:35 -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
Mike Frysinger 14b8020dda make gd/gd2 image formats optional #428
We still enable them by default, but we'll probably flip them off
in the next major release series.
2018-01-30 17:58:44 -05:00
Mike Frysinger 660abbeb96 fix some unused variable errors when built w/out png 2017-02-15 10:57:24 -05:00
Pierre Joye 81888a70b0 update 2016-06-24 09:13:12 +07:00
Mike Frysinger 046290cd9e travis: update comments and add git status check
Want to make sure we don't forget to update .gitignore files!
2016-06-10 14:45:48 -04:00
Pierre Joye 45f16d0769 Merge branch 'GD-2.2'
* GD-2.2:
  fix #172 single line rectangle creates wriclers. Simplify test.

Conflicts:
	tests/gdimagerectangle/github_bug_00172.c
2016-06-09 10:56:18 +07:00
Mike Frysinger c9a4a85f38 libimagequant: fix integration
The symbol was being set up in cmake but not on the autotools side.
Clean this up to be like other external libraries.

We need to pull in some openmp logic as it's not uncommon for the lib
to be built with openmp support.  When we test for it, we need to do
so with openmp flags.

Fixes #137.
2016-05-18 03:03:50 -04: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
Wangkun 917fa11bfb fix CMake error when ENABLE_WEBP 2015-05-07 17:48:37 +08:00
Ondřej Surý 9d20d61bf0 Add C99 inttypes support to gd.c 2013-05-02 09:30:37 +02:00
Pierre Joye e50515d82d add missing HAVE_VPX 2013-04-24 07:49:49 +02:00
Pierre Joye f4ab220d7c Merge branch 'master' of https://bitbucket.org/libgd/gd-libgd 2013-04-21 00:14:55 +02:00
Pierre Joye fb233dff4e update comment to make clear what generates it 2013-04-21 00:12:39 +02:00
Takeshi Abe 382e22e71a remove gone item 2013-04-20 08:16:12 +09:00
Kornel Lesiński cfa23367ad Download libimagequant in cmakefile if needed
--HG--
branch : liq
extra : source : de3e993342bc3d4eefe4b638143a7657e0aafe62
extra : histedit_source : 961d951975c5df5b9da5848ce2b04777a2156890%2C12013ded8ac6e49f8af6e757daa1aad8299d3e65
2013-03-25 23:46:54 +00:00
pajoye ddf0248d1d - fix build
- add HAVE_LIBTIFF config
2007-10-05 05:35:58 +00:00
pajoye 95beda7f1f - config.h.in for cmake 2007-01-24 22:32:32 +00:00