Commit Graph

17 Commits (f2aa2836ed910ca3510585a47a8a064b5140e148)

Author SHA1 Message Date
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
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
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
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 ac527e646e delete webpimg.c references
This code was purged w/libvpx recently.
2015-04-11 16:25:49 -04:00
Nathanael Jones 7c2b0713e7 Replace windows MSVC makefile; update msys iconv path. 2015-01-07 01:52:00 -05:00
Chris Reuter 2d5dc2e1cd MSys Makefile now statically links libgd.dll to libiconv.
This reduces dependencies but merges in LGPL code.  You can also
dynamically link it by commenting and uncommenting two lines.
2014-03-07 15:20:59 -05:00
Chris Reuter 01104a2591 MSys Makefile fix
Now adds the -static-libgcc flag.  This removes libgcc as a dependency.
2014-03-05 11:55:59 -05:00
Chris Reuter 7a8e8b2e33 Bug fix: GD DLL rename hadn't been propagated everywhere. 2014-03-01 18:52:12 -05:00
Chris Reuter 6b94f66831 Minor enhancements to the MinGW+Msys build scripts.
Makefile now creates a zipfile containing the DLLs.

Resulting DLL no longer contains a version number in its name.  (The
Windows convention is to ship the DLL with the program using it.
Versioning the name just makes it harder for scripts to find the DLL.)

Tweaked the README a bit.
2014-02-24 17:41:02 -05:00
Chris Reuter 339b17aeff Updated the MSys build files.
The Makefiles and scripts for building under MSYS had rotted a bit.  This
change fixes those things.
2014-02-07 14:17:17 -05:00
Chris Reuter 769fb1534c Added another Makefile.
This change adds a Makefile and bash script for building and testing
libgd on Windows with MinGW and MSYS.  This was written after I
concluded that it was easier and faster to just write a new Makefile
from scratch than to get autotools or CMake to play nicely with my
Windows installation.
2013-11-11 16:38:58 -05:00