Skip to content

Commit 1a04787

Browse files
authored
updated libheif to 1.19.7 (#339)
1 parent fcd8db3 commit 1a04787

File tree

9 files changed

+32
-22
lines changed

9 files changed

+32
-22
lines changed

.github/workflows/analysis-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ jobs:
244244
cp ${{ env.MSYS2_PREFIX }}/bin/libstdc++-6.dll $site_packages/
245245
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libsharpyuv-*.dll $site_packages/
246246
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libdav1d-*.dll $site_packages/
247-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/rav1e.dll $site_packages/
247+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/librav1e.dll $site_packages/
248248
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libkvazaar-*.dll $site_packages/
249249
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libcryptopp.dll $site_packages/
250250
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libjpeg-*.dll $site_packages/

libheif/linux_build_libs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
LIBX265_URL = "https://bitbucket.org/multicoreware/x265_git/get/0b75c44c10e605fe9e9ebed58f04a46271131827.tar.gz"
1515
LIBAOM_URL = "https://aomedia.googlesource.com/aom/+archive/v3.6.1.tar.gz"
1616
LIBDE265_URL = "https://github.com/strukturag/libde265/releases/download/v1.0.15/libde265-1.0.15.tar.gz"
17-
LIBHEIF_URL = "https://github.com/strukturag/libheif/releases/download/v1.19.5/libheif-1.19.5.tar.gz"
17+
LIBHEIF_URL = "https://github.com/strukturag/libheif/releases/download/v1.19.7/libheif-1.19.7.tar.gz"
1818

1919

2020
def download_file(url: str, out_path: str) -> bool:

libheif/macos/libheif.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
class Libheif < Formula
44
desc "ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
55
homepage "https://www.libde265.org/"
6-
url "https://github.com/strukturag/libheif/releases/download/v1.19.5/libheif-1.19.5.tar.gz"
7-
sha256 "d3cf0a76076115a070f9bc87cf5259b333a1f05806500045338798486d0afbaf"
6+
url "https://github.com/strukturag/libheif/releases/download/v1.19.7/libheif-1.19.7.tar.gz"
7+
sha256 "161c042d2102665fcee3ded851c78a0eb5f2d4bfe39fba48ba6e588fd6e964f3"
88
license "LGPL-3.0-only"
99
# Set current revision from what it was taken plus 10
1010
revision 10

libheif/windows/mingw-w64-libheif/PKGBUILD

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
_realname=libheif
55
pkgbase=mingw-w64-${_realname}
66
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
7-
pkgver=1.19.5
8-
pkgrel=1
7+
pkgver=1.19.7
8+
pkgrel=2
99
pkgdesc="HEIF image decoder/encoder library and tools (mingw-w64)"
1010
arch=('any')
1111
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
1212
url="https://github.com/strukturag/libheif"
13-
license=('spdx:LGPL-3.0' 'spdx:MIT')
13+
msys2_references=(
14+
"cpe: cpe:/a:struktur:libheif"
15+
)
16+
license=('spdx:LGPL-3.0 AND MIT')
1417
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
1518
"${MINGW_PACKAGE_PREFIX}-ninja"
1619
"${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2"
@@ -20,7 +23,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
2023
"${MINGW_PACKAGE_PREFIX}-libde265"
2124
"${MINGW_PACKAGE_PREFIX}-x265")
2225
source=("https://github.com/strukturag/libheif/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
23-
sha256sums=('d3cf0a76076115a070f9bc87cf5259b333a1f05806500045338798486d0afbaf')
26+
sha256sums=('161c042d2102665fcee3ded851c78a0eb5f2d4bfe39fba48ba6e588fd6e964f3')
2427

2528
build() {
2629
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}

pi-heif/libheif/macos/libheif.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
class Libheif < Formula
44
desc "ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
55
homepage "https://www.libde265.org/"
6-
url "https://github.com/strukturag/libheif/releases/download/v1.19.5/libheif-1.19.5.tar.gz"
7-
sha256 "d3cf0a76076115a070f9bc87cf5259b333a1f05806500045338798486d0afbaf"
6+
url "https://github.com/strukturag/libheif/releases/download/v1.19.7/libheif-1.19.7.tar.gz"
7+
sha256 "161c042d2102665fcee3ded851c78a0eb5f2d4bfe39fba48ba6e588fd6e964f3"
88
license "LGPL-3.0-only"
99
# Set current revision from what it was taken plus 10
1010
revision 10

pi-heif/libheif/windows/mingw-w64-libheif/PKGBUILD

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@
44
_realname=libheif
55
pkgbase=mingw-w64-${_realname}
66
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
7-
pkgver=1.19.5
8-
pkgrel=1
7+
pkgver=1.19.7
8+
pkgrel=2
99
pkgdesc="HEIF image decoder/encoder library and tools (mingw-w64)"
1010
arch=('any')
1111
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
1212
url="https://github.com/strukturag/libheif"
13-
license=('spdx:LGPL-3.0' 'spdx:MIT')
13+
msys2_references=(
14+
"cpe: cpe:/a:struktur:libheif"
15+
)
16+
license=('spdx:LGPL-3.0 AND MIT')
1417
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
1518
"${MINGW_PACKAGE_PREFIX}-ninja"
1619
"${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2"
1720
"${MINGW_PACKAGE_PREFIX}-cc")
1821
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
1922
"${MINGW_PACKAGE_PREFIX}-libde265")
2023
source=("https://github.com/strukturag/libheif/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
21-
sha256sums=('d3cf0a76076115a070f9bc87cf5259b333a1f05806500045338798486d0afbaf')
24+
sha256sums=('161c042d2102665fcee3ded851c78a0eb5f2d4bfe39fba48ba6e588fd6e964f3')
2225

2326
build() {
2427
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}

pillow_heif/_pillow_heif.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,11 +1471,6 @@ static PyObject* _load_file(PyObject* self, PyObject* args) {
14711471
#if LIBHEIF_HAVE_VERSION(1,19,0)
14721472
if (disable_security_limits) {
14731473
heif_context_set_security_limits(heif_ctx, heif_get_disabled_security_limits());
1474-
} else {
1475-
// override libheif default value for max_memory_block_size from 512MB to 768MB
1476-
struct heif_security_limits* current_limits = heif_context_get_security_limits(heif_ctx);
1477-
current_limits->max_memory_block_size = 768 * 1024 * 1024;
1478-
heif_context_set_security_limits(heif_ctx, current_limits);
14791474
}
14801475
#endif
14811476

tests/basic_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_full_build():
105105
assert info["HEIF"]
106106
assert info["encoders"]
107107
assert info["decoders"]
108-
expected_version = os.getenv("EXP_PH_LIBHEIF_VERSION", "1.19.5")
108+
expected_version = os.getenv("EXP_PH_LIBHEIF_VERSION", "1.19.7")
109109
if expected_version:
110110
assert info["libheif"] == expected_version
111111

@@ -116,7 +116,7 @@ def test_light_build():
116116
assert not info["AVIF"]
117117
assert not info["HEIF"]
118118
assert info["decoders"]
119-
expected_version = os.getenv("EXP_PH_LIBHEIF_VERSION", "1.19.5")
119+
expected_version = os.getenv("EXP_PH_LIBHEIF_VERSION", "1.19.7")
120120
if expected_version:
121121
assert info["libheif"] == expected_version
122122

tests/read_test.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,5 +559,14 @@ def test_dav1d_decoder():
559559
pillow_heif.options.PREFERRED_DECODER["AVIF"] = ""
560560

561561

562+
@pytest.mark.skipif(
563+
parse_version(pillow_heif.libheif_version()) < parse_version("1.19.7"), reason="Requires libheif 1.19.7."
564+
)
562565
def test_200_megapixels():
563-
pillow_heif.open_heif("images/heif_special/200MP.heic")
566+
with pytest.raises(RuntimeError):
567+
_ = pillow_heif.open_heif("images/heif_special/200MP.heic").data
568+
try:
569+
pillow_heif.options.DISABLE_SECURITY_LIMITS = True
570+
_ = pillow_heif.open_heif("images/heif_special/200MP.heic").data
571+
finally:
572+
pillow_heif.options.DISABLE_SECURITY_LIMITS = False

0 commit comments

Comments
 (0)