Commit Graph

66 Commits (7efcf4f935d0466b6ada44bed62d729cd2cddbc4)

Author SHA1 Message Date
مهدي شينون (Mehdi Chinoune) 7efcf4f935
Some fixes for MINGW (#828)
* Enable webpng on MINGW

* Detect GD version using cmake language

* Use _aligned_malloc instead of posix_memalign on Windows

* Include missing "errno.h"

* Fix finding WEBP on MINGW

* Fix finding XPM on MINGW

* Use PkgConfig to find packages on MINGW

* CI: Enable more options  for MINGW
2022-04-15 15:34:24 +07:00
Pierre Joye c6fcb5d4cb These are not .c files, should work on gcc and make clang linker happy 2021-08-29 23:42:39 +07:00
Pierre Joye 1a04cda56a remove annotate from windows builds 2021-08-23 21:18:29 +07:00
Pierre Joye 8864a3086f remove from .c too 2021-08-23 21:05:17 +07:00
Pierre Joye 3dc1ea0d5f +NOT 2021-08-23 20:57:30 +07:00
Pierre Joye 18324c72c2 tried, remove it from windows build, will need portable codes elsewhere 2021-08-23 20:27:40 +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
wilson chen 28ecfe77c8
fix #303: gdlib.pc: use Requires instead of Libs (#537) 2020-06-18 14:55:32 +08:00
willson-chen ac7118680d Fix #539: Add RAQM support for cmake
* Add `ENABLE_RAQM` option to CMakeLists.txt
* Add cmake module FindRAQM.cmake
2019-11-02 00:59:43 -06:00
willson-chen b2011428f5 fixed cmake failed with MinGW
If BUILD_STATIC_LIBS is not On, cmake will failed for target ${GD_LIB_STATIC} doesn't exist.
2019-09-29 12:56:39 -04:00
Peter Kokot 434b639d53 Add leading blank lines check and trim redundant blank newlines 2018-10-05 10:27:50 -04:00
kohldampfer 2dc58f6d0a CMake process of generating VS solution and projects fails, because l… (#471)
CMake process of generating VS solution and projects fails, because libgd_static target is not visible at this point. This is a fix for this problem.

Fixes #467.
2018-09-09 18:26:01 -04: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 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 dd76e8fcf2 generate & install gdlib.pc for cmake builds too #164 2018-01-10 01:56:10 -05:00
Mike Frysinger 5ebbd50cff cmake: add soname info to libgd.so
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.
2016-11-10 09:09:14 -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 c78ae3e4d6 cmake: add visibility support #260
This makes sure we don't export symbols in libgd.so that we shouldn't.

We now assume that, if you're using gcc, you're using at least version
3.3 as that's the first to support the visibility attribute.  We can
wait to see if anyone complains before worrying about older ones.
2016-07-22 18:12:48 +05:30
Mike Frysinger 5090a9ebf7 cmake: allow static libs to be disabled
The standard behavior in distros nowadays is to build shared libs and
omit static libs.  Split the build knobs in cmake to support this.  It
also matches what's available with the autotools build.
2016-07-22 15:09:04 +05:30
Mike Frysinger b083ec17ad cmake: update build files to match autotools more
Clean up redundant header logic and focus on what we actually care about:
whether specific headers exist.

Update the program list to omit programs when required libs are not found.
2016-05-14 01:01:44 -04:00
Mike Frysinger cd1d964179 libgd: update & sort cmake installed headers #164
The cmake side of things was missing two installed headers.
2016-04-30 21:12:51 -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
Mike Frysinger 73ab7c7d28 Merge pull request #182 from leoyanggit/fix_build_static
Make BUILD_SHARED_LIBS configurable
2015-12-23 11:59:17 -05:00
Peter Jas 2e04a67853 win: Use an external snprintf hook.
* For VS2013 and below, it will compile and additional file `src/snprintf.c`, which contains the fallback implementation. The
function is included with `extern` in other files where required.
* In `src/CMakeLists.txt`, `snprintf.c` is included in sources conditionally; only for
VS2013 and below.
* Note that I have also guarded it with condition inside the `snprintf.c` file, so if any consumer/downstream is not using `cmake` but their own build system (say gyp), this will still prevent them redefining snprintf for VS2015 even if they add `/src/snprintf.c` in to-be-compiled sources unconditionally.
2015-11-23 21:18:37 +00:00
Leo Yang 7147b646f4 Make BUILD_SHARED_LIBS configurable
As previously build both shared and static if BUILD_SHARED_LIBS is ON.
Otherwise build static only.
2015-08-27 13:11:37 -04:00
Wangkun 917fa11bfb fix CMake error when ENABLE_WEBP 2015-05-07 17:48:37 +08: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 40c6129986 Normalize static lib name to libgd.a on *nix and libgd_static.lib on windows. 2015-01-07 01:55:53 -05:00
Nathanael Jones f82b371418 Add libiconv support to CMake files 2014-10-02 14:59:29 -04:00
Chris Reuter e82b084159 Added new files to CMakeLists.txt.
Added new sources and tests to the relevant CMakeLists.txt files.

NOTE: This works for me but I am not a cmake expert.
2013-11-07 19:44:45 -05:00
Pierre Joye 83c7d842a3 add missing files 2013-06-10 08:37:19 +02:00
Pierre Joye 6d30fb875a add gd_xbm.c 2013-04-23 07:57:30 +02:00
Pierre Joye a6c46aa8ff nc 2013-04-21 00:23:45 +02:00
Pierre Joye f1a7c899e7 install gd_errors.h 2013-04-18 21:22:24 +02:00
Pierre Joye 0f0894a7dd - move pixelate filter to gd_filter.c 2013-04-05 07:50:25 +02:00
Pierre Joye d8e19af742 backport php's gd filter 2013-04-05 01:05:36 +02:00
Pierre Joye 0c21e2cfc1 backport php's gd webp support 2013-04-04 22:24:57 +02:00
Pierre Joye e7a8d065f5 add zlib to dep (use by gd(2) format) 2013-04-04 16:47:26 +02: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
Takeshi Abe e204de524b import FindFontConfig.cmake
from <http://freetype-gl.googlecode.com/svn-history/r110/trunk/CMakeModules/FindFontConfig.cmake>

This replaces old FindFontconfig.cmake using obsolete UsePkgConfig.
2013-02-22 10:44:28 +09: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 9e99669aec define the installation targets. 2008-12-12 17:09:39 +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 f5e3799b92 added gd_color_map.[ch] to LIBGD_SRC_FILES. 2008-08-15 03:08:55 +00:00
scottmac a2f357b230 Add bmp code to build scripts. 2008-05-31 19:56:45 +00:00
pajoye 4026e0eced - add ms-bit-fields option for mingw and msys 2008-05-09 08:13:08 +00:00