Commit Graph

51 Commits (master)

Author SHA1 Message Date
Pierre Joye de563c2520
Merge pull request #636 from willson-chen/mv_gd_color_map_test_to_tests
Move src/gd_color_map_test.c to tests
2021-08-26 19:11:15 +07:00
Mike Frysinger b2769ffe40 stop installing entities.h 2021-04-24 23:26:48 -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 d6e3413f7f drop unused snprintf fallback
This was added ages ago with code that has since been deleted.
2021-02-21 12:48:22 -05:00
willson-chen bfb3139110 Move src/gd_color_map_test.c to tests
And improve it more like a test case.
2020-05-06 15:01:17 +08:00
Mike Frysinger 08b0dbaec6 move (redundant) ifdef checks from source to build files
We've been tracking program deps in the build files, so it ends up
being redundant for a lot of our test/example programs.  Clean them
up, and update some of the cmake/automake files as needed.
2018-06-21 23:55:11 -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 1daf261a83 include getopt for Windows builds
Since getopt is only needed by various helper programs, we start a new
program utility static library to stuff things into so they don't fill
up the gd library itself.

This comes from NetBSD.  Fixes #401.
2018-01-29 18:09:57 -05:00
Mike Frysinger 60016a4426 include snprintf.c in the dist tarball
The cmake files refer to it for older Windows builds.  Fixes #416.
2018-01-10 00:59:34 -05:00
Mike Frysinger d304360411 build: sync libgd source lists
The cmake build was missing gd_color_match.c which meant the library
didn't export the gdImageColorMatch function.  Sync the two lists in
the autotools and cmake files to make this easier to check.  Listing
header files in autotools source lists isn't a problem.
2016-07-22 18:12:48 +05:30
Mike Frysinger b64c996b07 build: fix GDLIB_REVISION collision
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.
2016-05-18 02:34:45 -04:00
Mike Frysinger e16310b27c libgd: update & sort source lists
The Makefile.am has no changes other than sorting & unwrapping the files
to make it a bit more readable (and dropping duplicate entries).

The CMakeLists.txt gains a few files that were added recently but left
out of the cmake build.

Closes #183.
2016-04-30 21:00:31 -04:00
Pierre Joye 824a3aaa37 remove remaining libvpx related code 2015-01-20 07:06:09 +01:00
Chris Reuter c9d2f89597 Added gdImageFile(), gdImageCreateFromFile() and gdSupportsFileType().
These are convenience functions which load or save image data to a
file.  They are roughly equivalent to opening a file handle with
fopen() and calling gdImageCreateFrom*() or gdImage*() on the FILE
pointer.  However, these functions identify the input or output format
from the filename suffix and call the appropriate read or write
function accordingly.

gdSupportsFileType() can be used to test if a specific file format
is supported.

Most scripting interfaces already do something like this but now
there's support for doing it from C as well.

This change also adds test cases for the code and naturaldocs
documentation.
2013-12-16 17:27:34 -05:00
Chris Reuter 4378b8ded4 gd.h now holds the canonical version number.
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.)
2013-11-07 19:44:45 -05:00
Ondřej Surý 011cdd1457 Add msinttypes/ folder to EXTRA_DIST (fixes #73) 2013-06-22 08:36:46 +02:00
Marcin Wojdyr 6c1677707a autotools: build DLLs on Windows (win32-dll libtool option)
Since there are no undefined symbols in libgd,
-no-undefined can be added unconditionally.
2013-05-10 20:07:58 +01:00
Ondřej Surý 29a6d2ae04 s{src/{{ fix 2013-05-05 12:34:54 +02:00
Ondřej Surý 239a1d32b4 Add src/config.h.cmake and src/*.cxx to EXTRA_DIST 2013-05-05 00:14:22 +02:00
Ondřej Surý 04d39085e6 Merged in php-libgd (pull request #3)
Merge missing functions to compile PHP GD library
2013-04-22 20:32:16 +02:00
Ondřej Surý f3375cbc33 Gd2 functions need LIBZ 2013-04-22 16:43:39 +02:00
Ondřej Surý 632b0c221b Conditionally compile tests in src/ 2013-04-22 16:43:39 +02:00
Ondřej Surý 5b5f365499 Build and check all tests from tests/ subdirectory in the make check target 2013-04-22 16:43:39 +02:00
Ondřej Surý 948a154266 Merge gdImageColorMatch from php-libgd 2013-04-22 08:44:21 +02:00
Ondřej Surý decf4407d4 Merge PHP libgd Xbm code 2013-04-22 08:44:21 +02:00
Pierre Joye f93536c758 #44, do not enable annotate if no freetype is enabled, add missing header 2013-04-21 13:38:19 +02:00
Ondřej Surý e5d9ea1826 Rename E_{ERROR,WARNING,...} to GD_{ERROR,WARNING,...} and install the header 2013-04-18 08:28:36 +02:00
Mike Frysinger 0cde6255cc skip certain programs when png/zlib are not available
We can build gd w/out png/zlib support, but some of the helper
programs require that functionality.  Disable the programs based
on what libs are available.
2013-04-16 18:18:47 -04:00
Mike Frysinger 85a57d915d do not build test/demo programs by default
Since these are test programs, move them to the check target.
That is, you can still get these by running `make check`.
2013-04-16 18:18:47 -04:00
Pierre Joye c5fcf8446b - distribute cmake files too 2013-04-11 08:14:56 +02:00
Pierre Joye 2fb9e486bf index.html is long gone, fix make dist-all 2013-04-11 06:28:10 +02:00
Ondřej Surý 4ee018de2c Update library version information according to http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info 2013-04-08 09:27:45 +02:00
Pierre Joye c2711be4c9 add tiff to autoconf build scripts 2013-04-07 20:55:40 +02:00
Pierre Joye 35649d41ba add new functions, affine, scale, rotate, etc. src files 2013-04-07 18:43:49 +02:00
Vincent Bernat 90087507e6 Fix build with autotools.
`configure.ac` and `bootstrap.sh` are moved in the top directory.
`bootstrap.sh` is completed to execute `libtoolize`. The list of files
to clean is reduced. Other files can be cleaned with `make distclean`.

`src/Makefile.am` is fixed for missing `gd_nnquant.c` dependency.

`ACX_PTHREAD` macro is moved to a `m4` directory to make `configure.ac`
easier to read.

--HG--
branch : fix/autotools
rename : src/bootstrap.sh => bootstrap.sh
rename : src/configure.ac => configure.ac
2013-04-07 00:12:32 +02:00
tabe 9563181569 adapted Kalle's scatter filter. see FS#208 2009-09-20 10:47:28 +09:00
tabe 43be24fd8b added new filter gdImagePixelate(). (see FS#184) 2008-12-21 09:08:11 +00:00
tabe b14559beb7 added gdImageColorReplaceThreshold. (see FS#170)
- added gd_color.[ch] for internal use
2008-11-23 14:32:35 +00:00
tabe 7e5096d3c0 added the function to look up color names. (see FS#169) 2008-08-05 15:00:51 +00:00
pajoye 26ab43413f - removed unused part (moved to /Makefile.am) 2008-05-10 20:31:37 +00:00
pajoye 1d88ed5072 - #129, Add flip functions, horizontally, vertically 2007-11-03 10:40:14 +00:00
pajoye 6f648823d3 - MFB: #31 — Shared library support on cygwin (Dr. Volker Zell) 2007-02-03 01:16:48 +00:00
pajoye 473aecb75d - #9, configure/build script updates auto* lib* (Lars Hecking) 2006-10-09 14:22:22 +00:00
pierre 0c31694114 - sync to 2.0.29 2006-04-05 15:54:20 +00:00
pierre b9d845987e - sync to 2.0.28 2006-04-05 15:53:57 +00:00
pierre c01e3e8da6 - sync to 2.0.26 2006-04-05 15:53:17 +00:00
pierre f505eacdb8 - sync to 2.0.17 2006-04-05 15:49:38 +00:00
pierre 871d0d852c - sync to 2.0.12 2006-04-05 15:47:57 +00:00
pierre b0243fe7b1 - sync to 2.0.5 2006-04-05 15:44:56 +00:00