diff options
author | Martin Reboredo <39890836+YakoYakoYokuYoku@users.noreply.github.com> | 2021-03-02 14:32:03 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-02 12:32:03 -0500 |
commit | 39c4644fa01f6b9f002119e4109e252bc665b8f1 (patch) | |
tree | 852d151b50717219ebff215b4b6f65a945ebf9f3 /CMakeLists.txt | |
parent | d6a061850d40110a98364766f654030f929ec0ed (diff) | |
download | libgd-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 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bf7836f..b13767d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ OPTION(ENABLE_XPM "Enable XPM support" 0) OPTION(ENABLE_FREETYPE "Enable Freetype2 support" 0) OPTION(ENABLE_FONTCONFIG "Enable FontConfig support" 0) OPTION(ENABLE_WEBP "Enable WebP support" 0) +OPTION(ENABLE_HEIF "Enable HEIF support" 0) OPTION(ENABLE_RAQM "Enable RAQM support" 0) if (BUILD_TEST) @@ -119,6 +120,10 @@ else (USE_EXT_GD) FIND_PACKAGE(WEBP REQUIRED) ENDIF (ENABLE_WEBP) + IF (ENABLE_HEIF) + FIND_PACKAGE(HEIF REQUIRED) + ENDIF (ENABLE_HEIF) + IF (ENABLE_LIQ) FIND_PACKAGE(LIQ REQUIRED) ENDIF (ENABLE_LIQ) @@ -171,6 +176,11 @@ else (USE_EXT_GD) SET(HAVE_LIBWEBP 1) ENDIF(WEBP_FOUND) + IF(HEIF_FOUND) + INCLUDE_DIRECTORIES(${HEIF_INCLUDE_DIR}) + SET(HAVE_LIBHEIF 1) + ENDIF(HEIF_FOUND) + IF(PNG_FOUND) INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR}) SET(HAVE_LIBPNG 1) |