This was released in 2012, and only developers really need it, so
bump the requirement. This will let us use some newer features
that aren't available in 2.64.
The configure script has already been requiring freetype-2.1.10+, so
this isn't really dropping old support. Even then, 2.1.3 was released
in 2002, so users have had plenty of time to upgrade.
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.
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.
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_FUNC_VPRINTF`.
This macro checks for presence of the C `vprint` function otherwise
checks for the presence of the `_doprnt` function. This check was
relevant on very old systems and today can be omitted since it should
be well supported by now. [2]
Also libgd doesn't use the `HAVE_VPRINTF` or `HAVE_DOPRNT` symbols.
Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems, including the `AC_C_CONST`.
The `const` keyword is used in C since C89. On old systems some compilers
lacked the `const` and this macro defined it to be empty. This check was
relevant on systems with compilers before C89 and on current systems it
can be omitted. [2]
The libgd also requires at least C89 or newer so `const` is always available.
Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
Pull out the library versioning info out of configure and into a common
script that both cmake & autotools can run. This way we have a single
source of truth for the versioning info.
We've been shipping the pkg-config file for a while now and
want people to use that only, so drop this old script.
This also drop the FEATURES variable as it was only available
via `gdlib-config --features` (and no one has complained).
This header provides a single define: GDTEST_TOP_DIR. Move it to the
build CPPFLAGS instead since it's a path var and that's the recommended
way of handling these (by autotools standards), and it simplifies the
build overall. It also harmonizes the autotool & cmake build paths.
We localize this define to the gdtest/ subdir as we don't want any of
the other tests using the path. We have gdtest helpers instead.
This pull request (based on Asma's works) adds support for languages that require [complex text
layout](https://en.wikipedia.org/wiki/Complex_text_layout).
We are using [libraqm](https://github.com/HOST-Oman/libraqm), a small source
code-only library that wraps FriBidi (for bidirectional text support) and
HarfBuzz (for text shaping), and does proper BiDi and script itemization.
The CTL support is enabled by default but can be disabled at compiling time,
and we provide a fallback function that uses your original code without CTL
support.
It seems the OS X linker restricts the revision field to 8 bits.
Rework how we calculate that value and pack it in closer to fit.
It might produce some collisions if we get to like 2.2.8, but oh
well ... this field doesn't need to be super exact.
Fixes#214.
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.
We are using GDLIB_REVISION to refer to the gd version string (the "z"
in "x.y.z"), and we are using it to control the libtool revision field.
This leads to problems where the version increases (e.g. "2.1.1") but
the libtool revision doesn't (e.g. "0"). So scripts end up seeing a
revision of "0" in their output instead of "1".
Namespace the libtool version variables with "_LT_" to avoid any more
collisions.
Fixes#140.
The various code paths were inconsistent in how they handled user flags.
Create common macros and rebase all the library checks on top of those
so we know they all stay in sync.
Up to now, the version numbers were defined in configure.ac and put
into gd.h by generating it from gd.h.in, replacing the values of
several C macros. This violates the DRY principle, won't work on a
dumb build system, confuses some dev tools and is just a huge headache
in general.
This change makes gd.h (no longer generated) the home of the version
number and provides a script (config/getver.pl) which can extract the
requested version components from the header file. configure.ac now
gets the version number from gd.h instead of vice versa.
In addition, there are now C functions that return the values of the
version macros. This is for the benefit of non-C code using the
library without access to the header file. It also provides a way to
get the version number of the library currently linked rather than the
header the program was compiled against. (This could change if the
shared library is updated without recompiling the program using it.)