summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMartin Reboredo <39890836+YakoYakoYokuYoku@users.noreply.github.com>2021-03-02 14:32:03 -0300
committerGitHub <noreply@github.com>2021-03-02 12:32:03 -0500
commit39c4644fa01f6b9f002119e4109e252bc665b8f1 (patch)
tree852d151b50717219ebff215b4b6f65a945ebf9f3 /configure.ac
parentd6a061850d40110a98364766f654030f929ec0ed (diff)
downloadlibgd-39c4644fa01f6b9f002119e4109e252bc665b8f1.tar.gz
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a2b6f18..5a4c357 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,14 @@ GD_LIB_PKG_CHECK([LIBWEBP], [WEBP], [webp], [libwebp], [
])
])
+dnl Check for heif support.
+GD_LIB_PKG_CHECK([LIBHEIF], [HEIF], [heif], [libheif >= 1.7.0], [
+ AC_CHECK_LIB([heif], [heif_get_version], [dnl
+ AS_VAR_APPEND([LIBHEIF_LIBS], [" -lheif"])
+ gd_found_lib=yes
+ ])
+])
+
gl_VISIBILITY()
CFLAGS="$CFLAGS $CFLAG_VISIBILITY"
@@ -314,6 +322,7 @@ AC_MSG_RESULT([
Support for PNG library: $gd_with_LIBPNG
Support for JPEG library: $gd_with_LIBJPEG
Support for WebP library: $gd_with_LIBWEBP
+ Support for HEIF library: $gd_with_LIBHEIF
Support for TIFF library: $gd_with_LIBTIFF
Support for Freetype 2.x library: $gd_with_LIBFREETYPE
Support for Fontconfig library: $gd_with_LIBFONTCONFIG