Skip to content

Commit c4aa22e

Browse files
committed
Merge branch 'main' into has_characters
2 parents 1a3eff9 + abb1d2b commit c4aa22e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1050
-347
lines changed

.github/workflows/test-docker.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,12 @@ jobs:
4343
ubuntu-24.04-noble-s390x,
4444
# Then run the remainder
4545
alpine,
46-
amazon-2-amd64,
4746
amazon-2023-amd64,
4847
arch,
4948
centos-stream-9-amd64,
5049
centos-stream-10-amd64,
51-
debian-12-bookworm-x86,
52-
debian-12-bookworm-amd64,
5350
debian-13-trixie-x86,
5451
debian-13-trixie-amd64,
55-
fedora-42-amd64,
5652
fedora-43-amd64,
5753
gentoo,
5854
ubuntu-22.04-jammy-amd64,

.github/workflows/wheels-dependencies.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ ARCHIVE_SDIR=pillow-depends-main
9393
FREETYPE_VERSION=2.14.3
9494
HARFBUZZ_VERSION=13.2.1
9595
LIBPNG_VERSION=1.6.56
96-
JPEGTURBO_VERSION=3.1.3
96+
JPEGTURBO_VERSION=3.1.4.1
9797
OPENJPEG_VERSION=2.5.4
98-
XZ_VERSION=5.8.2
98+
XZ_VERSION=5.8.3
9999
ZSTD_VERSION=1.5.7
100100
TIFF_VERSION=4.7.1
101101
LCMS2_VERSION=2.18
@@ -178,7 +178,6 @@ function build_libavif {
178178
build_simple nasm 2.16.03 https://www.nasm.us/pub/nasm/releasebuilds/2.16.03
179179
fi
180180

181-
local build_type=MinSizeRel
182181
local build_shared=ON
183182
local lto=ON
184183

@@ -195,9 +194,6 @@ function build_libavif {
195194
build_shared=OFF
196195
fi
197196
else
198-
if [[ "$MB_ML_VER" == 2014 ]] && [[ "$PLAT" == "x86_64" ]]; then
199-
build_type=Release
200-
fi
201197
libavif_cmake_flags=(-DCMAKE_SHARED_LINKER_FLAGS_INIT="-Wl,--strip-all,-z,relro,-z,now")
202198
fi
203199
if [[ -n "$IOS_SDK" ]] && [[ "$PLAT" == "x86_64" ]]; then
@@ -226,7 +222,7 @@ function build_libavif {
226222
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=$lto \
227223
-DCMAKE_C_VISIBILITY_PRESET=hidden \
228224
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
229-
-DCMAKE_BUILD_TYPE=$build_type \
225+
-DCMAKE_BUILD_TYPE=MinSizeRel \
230226
"${libavif_cmake_flags[@]}" \
231227
$HOST_CMAKE_FLAGS . )
232228

.github/workflows/wheels.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ concurrency:
3939
cancel-in-progress: true
4040

4141
env:
42-
EXPECTED_DISTS: 91
42+
EXPECTED_DISTS: 75
4343
FORCE_COLOR: 1
4444

4545
jobs:
@@ -74,26 +74,26 @@ jobs:
7474
os: macos-latest
7575
cibw_arch: arm64
7676
macosx_deployment_target: "11.0"
77-
- name: "manylinux2014 and musllinux x86_64"
77+
- name: "manylinux_2_28 x86_64"
7878
platform: linux
7979
os: ubuntu-latest
8080
cibw_arch: x86_64
81-
manylinux: "manylinux2014"
82-
- name: "manylinux_2_28 x86_64"
81+
build: "*manylinux*"
82+
- name: "musllinux x86_64"
8383
platform: linux
8484
os: ubuntu-latest
8585
cibw_arch: x86_64
86-
build: "*manylinux*"
87-
- name: "manylinux2014 and musllinux aarch64"
86+
build: "*musllinux*"
87+
- name: "manylinux_2_28 aarch64"
8888
platform: linux
8989
os: ubuntu-24.04-arm
9090
cibw_arch: aarch64
91-
manylinux: "manylinux2014"
92-
- name: "manylinux_2_28 aarch64"
91+
build: "*manylinux*"
92+
- name: "musllinux aarch64"
9393
platform: linux
9494
os: ubuntu-24.04-arm
9595
cibw_arch: aarch64
96-
build: "*manylinux*"
96+
build: "*musllinux*"
9797
- name: "iOS arm64 device"
9898
platform: ios
9999
os: macos-latest
@@ -128,10 +128,6 @@ jobs:
128128
CIBW_ARCHS: ${{ matrix.cibw_arch }}
129129
CIBW_BUILD: ${{ matrix.build }}
130130
CIBW_ENABLE: cpython-prerelease cpython-freethreading pypy
131-
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.manylinux }}
132-
CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: ${{ matrix.manylinux }}
133-
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: ${{ matrix.manylinux }}
134-
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux }}
135131
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}
136132

137133
- uses: actions/upload-artifact@v6

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The Python Imaging Library (PIL) is
55

66
Pillow is the friendly PIL fork. It is
77

8-
Copyright © 2010 by Jeffrey A. Clark and contributors
8+
Copyright © 2010 by Jeffrey 'Alex' Clark and contributors
99

1010
Like PIL, Pillow is licensed under the open source MIT-CMU License:
1111

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Python Imaging Library (Fork)
88

9-
Pillow is the friendly PIL fork by [Jeffrey A. Clark and
9+
Pillow is the friendly PIL fork by [Jeffrey 'Alex' Clark and
1010
contributors](https://github.com/python-pillow/Pillow/graphs/contributors).
1111
PIL is the Python Imaging Library by Fredrik Lundh and contributors.
1212
As of 2019, Pillow development is

Tests/images/pal8_offset.bmp

-9.04 KB
Binary file not shown.
496 Bytes
Binary file not shown.
202 Bytes
Binary file not shown.

Tests/images/trailer_loop.pdf

1.78 KB
Binary file not shown.

Tests/test_file_bmp.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_fallback_if_mmap_errors() -> None:
4242
# This image has been truncated,
4343
# so that the buffer is not large enough when using mmap
4444
with Image.open("Tests/images/mmap_error.bmp") as im:
45-
assert_image_equal_tofile(im, "Tests/images/pal8_offset.bmp")
45+
assert_image_equal_tofile(im, "Tests/images/bmp/g/pal8.bmp")
4646

4747

4848
def test_save_to_bytes() -> None:
@@ -238,11 +238,21 @@ def test_unsupported_bmp_bitfields_layout() -> None:
238238
Image.open(fp)
239239

240240

241-
def test_offset() -> None:
242-
# This image has been hexedited
243-
# to exclude the palette size from the pixel data offset
244-
with Image.open("Tests/images/pal8_offset.bmp") as im:
245-
assert_image_equal_tofile(im, "Tests/images/bmp/g/pal8.bmp")
241+
@pytest.mark.parametrize(
242+
"offset, path",
243+
(
244+
(26, "pal8os2.bmp"),
245+
(54, "pal8.bmp"),
246+
),
247+
)
248+
def test_offset(offset: int, path: str) -> None:
249+
image_path = "Tests/images/bmp/g/" + path
250+
# Exclude the palette size from the pixel data offset
251+
with open(image_path, "rb") as fp:
252+
data = fp.read()
253+
data = data[:10] + o32(offset) + data[14:]
254+
with Image.open(io.BytesIO(data)) as im:
255+
assert_image_equal_tofile(im, image_path)
246256

247257

248258
def test_use_raw_alpha(monkeypatch: pytest.MonkeyPatch) -> None:

0 commit comments

Comments
 (0)