Skip to content

Commit 4c16779

Browse files
authored
update libheif to 1.19.5 version (#312)
* update libheif to 1.19.5 version Signed-off-by: Alexander Piskun <[email protected]>
1 parent 03c7beb commit 4c16779

File tree

19 files changed

+472
-130
lines changed

19 files changed

+472
-130
lines changed

.github/workflows/analysis-coverage.yml

Lines changed: 87 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222

2323
jobs:
2424
analysis:
25-
runs-on: macos-12
25+
runs-on: macos-13
2626
name: Analysis
2727

2828
steps:
@@ -31,6 +31,12 @@ jobs:
3131
with:
3232
python-version: '3.12'
3333

34+
- name: Install Libheif
35+
run: |
36+
brew update
37+
brew install libheif
38+
brew upgrade libheif
39+
3440
- name: Install from source
3541
run: python3 -m pip install ".[dev]" wheel setuptools
3642

@@ -62,25 +68,25 @@ jobs:
6268
- name: LibHeif info
6369
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
6470

65-
- name: Generate coverage report
66-
run: |
67-
TEST_PLUGIN_LOAD="$(whereis libheif | awk '{print $2}')/plugins/libheif-x265.so" coverage run -m pytest
68-
coverage xml && coverage html
69-
70-
- name: HTML coverage to artifacts
71-
uses: actions/upload-artifact@v3
72-
with:
73-
name: coverage_linux
74-
path: ./htmlcov
75-
if-no-files-found: error
76-
77-
- name: Upload report to Codecov
78-
uses: codecov/codecov-action@v4
79-
with:
80-
token: ${{ secrets.CODECOV_TOKEN }}
81-
file: ./coverage.xml
82-
fail_ci_if_error: true
83-
verbose: true
71+
# - name: Generate coverage report
72+
# run: |
73+
# TEST_PLUGIN_LOAD="$(whereis libheif | awk '{print $2}')/plugins/libheif-x265.so" coverage run -m pytest
74+
# coverage xml && coverage html
75+
#
76+
# - name: HTML coverage to artifacts
77+
# uses: actions/upload-artifact@v3
78+
# with:
79+
# name: coverage_linux
80+
# path: ./htmlcov
81+
# if-no-files-found: error
82+
#
83+
# - name: Upload report to Codecov
84+
# uses: codecov/codecov-action@v4
85+
# with:
86+
# token: ${{ secrets.CODECOV_TOKEN }}
87+
# file: ./coverage.xml
88+
# fail_ci_if_error: true
89+
# verbose: true
8490

8591
coverage-linux-pillow-dev:
8692
runs-on: ubuntu-22.04
@@ -109,29 +115,29 @@ jobs:
109115
- name: LibHeif info
110116
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
111117

112-
- name: Generate coverage report
113-
run: |
114-
TEST_PLUGIN_LOAD="$(whereis libheif | awk '{print $2}')/plugins/libheif-x265.so" coverage run -m pytest
115-
coverage xml && coverage html
116-
117-
- name: HTML coverage to artifacts
118-
uses: actions/upload-artifact@v3
119-
with:
120-
name: coverage_linux_dev
121-
path: ./htmlcov
122-
if-no-files-found: error
123-
124-
- name: Upload report to Codecov
125-
uses: codecov/codecov-action@v4
126-
with:
127-
token: ${{ secrets.CODECOV_TOKEN }}
128-
file: ./coverage.xml
129-
fail_ci_if_error: true
130-
verbose: true
118+
# - name: Generate coverage report
119+
# run: |
120+
# TEST_PLUGIN_LOAD="$(whereis libheif | awk '{print $2}')/plugins/libheif-x265.so" coverage run -m pytest
121+
# coverage xml && coverage html
122+
#
123+
# - name: HTML coverage to artifacts
124+
# uses: actions/upload-artifact@v3
125+
# with:
126+
# name: coverage_linux_dev
127+
# path: ./htmlcov
128+
# if-no-files-found: error
129+
#
130+
# - name: Upload report to Codecov
131+
# uses: codecov/codecov-action@v4
132+
# with:
133+
# token: ${{ secrets.CODECOV_TOKEN }}
134+
# file: ./coverage.xml
135+
# fail_ci_if_error: true
136+
# verbose: true
131137

132138
coverage-macos:
133-
runs-on: macos-12
134-
name: Coverage(macOS) • 🐍3.10
139+
runs-on: macos-13
140+
name: Coverage(macOS-13) • 🐍3.10
135141
env:
136142
TEST_DECODE_THREADS: 0 # This test fails on GitHub on macOS. We have such enabled test on Cirrus.
137143

@@ -141,9 +147,14 @@ jobs:
141147
with:
142148
python-version: '3.10'
143149

144-
- name: Install from source
150+
- name: Install Libheif
145151
run: |
146-
python3 -m pip -v install ".[dev]"
152+
brew update
153+
brew install libheif
154+
brew upgrade libheif
155+
156+
- name: Install from source
157+
run: python3 -m pip -v install ".[dev]"
147158

148159
- name: LibHeif info
149160
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
@@ -176,10 +187,14 @@ jobs:
176187
with:
177188
python-version: '3.11'
178189

179-
- name: Install from source
190+
- name: Install Libheif
180191
run: |
181-
brew install --formula ./libheif/macos/libheif.rb
182-
python3 -m pip -v install ".[dev]"
192+
brew update
193+
brew install libheif
194+
brew upgrade libheif
195+
196+
- name: Install from source
197+
run: python3 -m pip -v install ".[dev]"
183198

184199
- name: LibHeif info
185200
run: python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
@@ -231,34 +246,34 @@ jobs:
231246
Get-ChildItem -Path $Env:MSYS2_PREFIX/bin -Force | Format-List
232247
cp ${{ env.MSYS2_PREFIX }}/bin/libheif.dll $site_packages/
233248
cp ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll $site_packages/
234-
cp ${{ env.MSYS2_PREFIX }}/bin/libx265*.dll $site_packages/
249+
cp ${{ env.MSYS2_PREFIX }}/bin/libx265-209.dll $site_packages/
235250
cp ${{ env.MSYS2_PREFIX }}/bin/libaom.dll $site_packages/
236251
cp ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll $site_packages/
237252
cp ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/
238253
cp ${{ env.MSYS2_PREFIX }}/bin/libstdc++-6.dll $site_packages/
239-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libsharpyuv-0.dll $site_packages/
240-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libdav1d-7.dll $site_packages/
254+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libsharpyuv-*.dll $site_packages/
255+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libdav1d-*.dll $site_packages/
241256
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/rav1e.dll $site_packages/
242-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libSvtAv1Enc.dll $site_packages/
243-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libkvazaar-7.dll $site_packages/
257+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libkvazaar-*.dll $site_packages/
244258
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libcryptopp.dll $site_packages/
245-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libjpeg-8.dll $site_packages/
246-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libopenjp2-7.dll $site_packages/
259+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libjpeg-*.dll $site_packages/
260+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libopenjp2-*.dll $site_packages/
247261
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/zlib1.dll $site_packages/
248-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libSvtAv1Dec-0.dll $site_packages/
249-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libSvtAv1Enc-2.dll $site_packages/
262+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libSvtAv1Dec-*.dll $site_packages/
263+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libSvtAv1Enc-*.dll $site_packages/
250264
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libbrotlicommon.dll $site_packages/
251265
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libbrotlidec.dll $site_packages/
252266
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libbrotlienc.dll $site_packages/
253-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libtiff-6.dll $site_packages/
267+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libtiff-*.dll $site_packages/
254268
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libzstd.dll $site_packages/
255-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libwebp-7.dll $site_packages/
256-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/liblzma-5.dll $site_packages/
269+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libwebp-*.dll $site_packages/
270+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/liblzma-*.dll $site_packages/
257271
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libLerc.dll $site_packages/
258272
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libdeflate.dll $site_packages/
259-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libjbig-0.dll $site_packages/
260-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libtiffxx-6.dll $site_packages/
261-
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libopenjph-0.*.dll $site_packages/
273+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libjbig-*.dll $site_packages/
274+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libtiffxx-*.dll $site_packages/
275+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libopenjph-*.dll $site_packages/
276+
cp -ErrorAction SilentlyContinue ${{ env.MSYS2_PREFIX }}/bin/libopenh264-*.dll $site_packages/
262277
263278
- name: Install from source
264279
run: |
@@ -366,11 +381,21 @@ jobs:
366381
run: sudo -H PH_LIGHT_ACTION=1 EXP_PH_LIBHEIF_VERSION="" python3 -m pytest
367382

368383
coverage-import-error:
369-
runs-on: macos-12
384+
runs-on: macos-13
370385
name: Coverage(ImportError)
371386

372387
steps:
373388
- uses: actions/checkout@v4
389+
- uses: actions/setup-python@v5
390+
with:
391+
python-version: '3.12'
392+
393+
- name: Install Libheif
394+
run: |
395+
brew update
396+
brew install libheif
397+
brew upgrade libheif
398+
374399
- name: Install from source
375400
run: |
376401
python3 -m pip -v install .

.github/workflows/test-src-build-linux.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
matrix:
3838
arch: ["amd64", "arm64"]
3939
docker_file: ["Alpine_3_19", "Alpine_3_20", "Almalinux_9", "Debian_12"]
40-
include:
41-
- arch: "amd64"
42-
docker_file: "Archlinux"
43-
- arch: "amd64"
44-
docker_file: "Fedora_39"
40+
# include:
41+
# - arch: "amd64"
42+
# docker_file: "Archlinux"
43+
# - arch: "amd64"
44+
# docker_file: "Fedora_39"
4545

4646
steps:
4747
- uses: actions/checkout@v4

.github/workflows/test-src-build-macos.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ concurrency:
2828
cancel-in-progress: true
2929

3030
jobs:
31-
full_macos_12:
32-
name: macOS:12-x86_64
33-
runs-on: macos-12
31+
full_macos_13:
32+
name: macOS:13-x86_64
33+
runs-on: macos-13
3434
env:
3535
TEST_DECODE_THREADS: 0 # This test fails on GitHub on macOS. We have such enabled test on Cirrus.
3636
PH_FULL_ACTION: 1
@@ -79,9 +79,9 @@ jobs:
7979
- name: Perform tests
8080
run: python3 -m pytest
8181

82-
lite_macos_12:
83-
name: macOS:12-x86_64(Pi-Heif)
84-
runs-on: macos-12
82+
lite_macos_13:
83+
name: macOS:13-x86_64(Pi-Heif)
84+
runs-on: macos-13
8585
env:
8686
TEST_DECODE_THREADS: 0
8787
PH_LIGHT_ACTION: 1

.github/workflows/test-src-build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
Get-ChildItem -Path $Env:MSYS2_PREFIX/bin -Force | Format-List
6767
cp ${{ env.MSYS2_PREFIX }}/bin/libheif.dll $site_packages/
6868
cp ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll $site_packages/
69-
cp ${{ env.MSYS2_PREFIX }}/bin/libx265*.dll $site_packages/
69+
cp ${{ env.MSYS2_PREFIX }}/bin/libx265-209.dll $site_packages/
7070
cp ${{ env.MSYS2_PREFIX }}/bin/libaom.dll $site_packages/
7171
cp ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll $site_packages/
7272
cp ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/

.github/workflows/wheels-pillow_heif.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
Get-ChildItem -Path $Env:MSYS2_PREFIX/bin -Force | Format-List
7272
${{ env.MSYS2_PREFIX }}/bin/strip -s -v ${{ env.MSYS2_PREFIX }}/bin/libheif.dll
7373
${{ env.MSYS2_PREFIX }}/bin/strip -s -v ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll
74-
${{ env.MSYS2_PREFIX }}/bin/strip -s -v ${{ env.MSYS2_PREFIX }}/bin/libx265.dll
74+
${{ env.MSYS2_PREFIX }}/bin/strip -s -v ${{ env.MSYS2_PREFIX }}/bin/libx265-209.dll
7575
${{ env.MSYS2_PREFIX }}/bin/strip -s -v ${{ env.MSYS2_PREFIX }}/bin/libaom.dll
7676
${{ env.MSYS2_PREFIX }}/bin/strip -s -v ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll
7777
${{ env.MSYS2_PREFIX }}/bin/strip -s -v ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
All notable changes to this project will be documented in this file.
22

3+
## [0.21.0 - 2024-1x-xx]
4+
5+
### Changed
6+
7+
- libheif updated from `1.18.2` to `1.19.3` version.
8+
39
## [0.20.0 - 2024-10-19]
410

511
### Added

docker/from_src/Alpine_3_19.Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ RUN \
99
nasm \
1010
aom-dev \
1111
x265-dev \
12-
libde265-dev \
1312
py3-numpy \
1413
py3-pillow
1514

docker/from_src/Alpine_3_20.Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ RUN \
55
python3-dev \
66
py3-pip \
77
alpine-sdk \
8-
libheif-dev \
8+
cmake \
9+
nasm \
10+
aom-dev \
11+
x265-dev \
12+
libde265-dev \
913
py3-numpy \
1014
py3-pillow
1115

@@ -16,6 +20,7 @@ COPY . /pillow_heif
1620
RUN \
1721
python3 -m venv --system-site-packages myenv && \
1822
source myenv/bin/activate && \
23+
python3 pillow_heif/libheif/linux_build_libs.py && \
1924
if [ `getconf LONG_BIT` = 64 ]; then \
2025
python3 -m pip install -v "pillow_heif/.[tests]"; \
2126
else \

0 commit comments

Comments
 (0)