mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-09-24 13:07:00 +03:00
Merge branch 'main' into ppc64le
This commit is contained in:
commit
18fe3f10d1
|
@ -1,4 +1,4 @@
|
||||||
mypy==1.18.1
|
mypy==1.18.2
|
||||||
IceSpringPySideStubs-PyQt6
|
IceSpringPySideStubs-PyQt6
|
||||||
IceSpringPySideStubs-PySide6
|
IceSpringPySideStubs-PySide6
|
||||||
ipython
|
ipython
|
||||||
|
|
10
.github/workflows/macos-install.sh
vendored
10
.github/workflows/macos-install.sh
vendored
|
@ -4,11 +4,19 @@ set -e
|
||||||
|
|
||||||
if [[ "$ImageOS" == "macos13" ]]; then
|
if [[ "$ImageOS" == "macos13" ]]; then
|
||||||
brew uninstall gradle maven
|
brew uninstall gradle maven
|
||||||
|
|
||||||
|
wget https://raw.githubusercontent.com/python-pillow/pillow-depends/main/freetype-2.14.1.tar.gz
|
||||||
|
tar -xvzf freetype-2.14.1.tar.gz
|
||||||
|
(cd freetype-2.14.1 \
|
||||||
|
&& ./configure \
|
||||||
|
&& make -j4 \
|
||||||
|
&& make install)
|
||||||
|
else
|
||||||
|
brew install freetype
|
||||||
fi
|
fi
|
||||||
brew install \
|
brew install \
|
||||||
aom \
|
aom \
|
||||||
dav1d \
|
dav1d \
|
||||||
freetype \
|
|
||||||
ghostscript \
|
ghostscript \
|
||||||
jpeg-turbo \
|
jpeg-turbo \
|
||||||
libimagequant \
|
libimagequant \
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
Tests/images/colr_bungee_older.png
Normal file
BIN
Tests/images/colr_bungee_older.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
|
@ -1494,7 +1494,9 @@ def test_default_font_size() -> None:
|
||||||
|
|
||||||
def draw_text() -> None:
|
def draw_text() -> None:
|
||||||
draw.text((0, 0), text, font_size=16)
|
draw.text((0, 0), text, font_size=16)
|
||||||
assert_image_equal_tofile(im, "Tests/images/imagedraw_default_font_size.png")
|
assert_image_similar_tofile(
|
||||||
|
im, "Tests/images/imagedraw_default_font_size.png", 1
|
||||||
|
)
|
||||||
|
|
||||||
check(draw_text)
|
check(draw_text)
|
||||||
|
|
||||||
|
@ -1513,7 +1515,9 @@ def test_default_font_size() -> None:
|
||||||
|
|
||||||
def draw_multiline_text() -> None:
|
def draw_multiline_text() -> None:
|
||||||
draw.multiline_text((0, 0), text, font_size=16)
|
draw.multiline_text((0, 0), text, font_size=16)
|
||||||
assert_image_equal_tofile(im, "Tests/images/imagedraw_default_font_size.png")
|
assert_image_similar_tofile(
|
||||||
|
im, "Tests/images/imagedraw_default_font_size.png", 1
|
||||||
|
)
|
||||||
|
|
||||||
check(draw_multiline_text)
|
check(draw_multiline_text)
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ from .helper import (
|
||||||
assert_image_equal,
|
assert_image_equal,
|
||||||
assert_image_equal_tofile,
|
assert_image_equal_tofile,
|
||||||
assert_image_similar_tofile,
|
assert_image_similar_tofile,
|
||||||
|
has_feature_version,
|
||||||
is_win32,
|
is_win32,
|
||||||
skip_unless_feature,
|
skip_unless_feature,
|
||||||
skip_unless_feature_version,
|
skip_unless_feature_version,
|
||||||
|
@ -549,7 +550,7 @@ def test_default_font() -> None:
|
||||||
draw.text((10, 60), txt, font=larger_default_font)
|
draw.text((10, 60), txt, font=larger_default_font)
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
assert_image_equal_tofile(im, "Tests/images/default_font_freetype.png")
|
assert_image_similar_tofile(im, "Tests/images/default_font_freetype.png", 0.13)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("mode", ("", "1", "RGBA"))
|
@pytest.mark.parametrize("mode", ("", "1", "RGBA"))
|
||||||
|
@ -1055,7 +1056,10 @@ def test_colr(layout_engine: ImageFont.Layout) -> None:
|
||||||
|
|
||||||
d.text((15, 5), "Bungee", font=font, embedded_color=True)
|
d.text((15, 5), "Bungee", font=font, embedded_color=True)
|
||||||
|
|
||||||
assert_image_similar_tofile(im, "Tests/images/colr_bungee.png", 21)
|
if has_feature_version("freetype2", "2.14.0"):
|
||||||
|
assert_image_similar_tofile(im, "Tests/images/colr_bungee.png", 6.1)
|
||||||
|
else:
|
||||||
|
assert_image_similar_tofile(im, "Tests/images/colr_bungee_older.png", 21)
|
||||||
|
|
||||||
|
|
||||||
@skip_unless_feature_version("freetype2", "2.10.0")
|
@skip_unless_feature_version("freetype2", "2.10.0")
|
||||||
|
@ -1071,7 +1075,7 @@ def test_colr_mask(layout_engine: ImageFont.Layout) -> None:
|
||||||
|
|
||||||
d.text((15, 5), "Bungee", "black", font=font)
|
d.text((15, 5), "Bungee", "black", font=font)
|
||||||
|
|
||||||
assert_image_similar_tofile(im, "Tests/images/colr_bungee_mask.png", 22)
|
assert_image_similar_tofile(im, "Tests/images/colr_bungee_mask.png", 14.1)
|
||||||
|
|
||||||
|
|
||||||
def test_woff2(layout_engine: ImageFont.Layout) -> None:
|
def test_woff2(layout_engine: ImageFont.Layout) -> None:
|
||||||
|
|
|
@ -183,7 +183,7 @@ def test_x_max_and_y_offset() -> None:
|
||||||
draw.text((0, 0), "لح", font=ttf, fill=500)
|
draw.text((0, 0), "لح", font=ttf, fill=500)
|
||||||
|
|
||||||
target = "Tests/images/test_x_max_and_y_offset.png"
|
target = "Tests/images/test_x_max_and_y_offset.png"
|
||||||
assert_image_similar_tofile(im, target, 0.5)
|
assert_image_similar_tofile(im, target, 3.8)
|
||||||
|
|
||||||
|
|
||||||
def test_language() -> None:
|
def test_language() -> None:
|
||||||
|
|
|
@ -75,6 +75,8 @@ These platforms have been reported to work at the versions mentioned.
|
||||||
| Operating system | | Tested Python | | Latest tested | | Tested |
|
| Operating system | | Tested Python | | Latest tested | | Tested |
|
||||||
| | | versions | | Pillow version | | processors |
|
| | | versions | | Pillow version | | processors |
|
||||||
+==================================+============================+==================+==============+
|
+==================================+============================+==================+==============+
|
||||||
|
| macOS 26 Tahoe | 3.9, 3.10, 3.11, 3.12, 3.13| 11.3.0 |arm |
|
||||||
|
+----------------------------------+----------------------------+------------------+--------------+
|
||||||
| macOS 15 Sequoia | 3.9, 3.10, 3.11, 3.12, 3.13| 11.3.0 |arm |
|
| macOS 15 Sequoia | 3.9, 3.10, 3.11, 3.12, 3.13| 11.3.0 |arm |
|
||||||
| +----------------------------+------------------+ |
|
| +----------------------------+------------------+ |
|
||||||
| | 3.8 | 10.4.0 | |
|
| | 3.8 | 10.4.0 | |
|
||||||
|
|
|
@ -114,7 +114,7 @@ ARCHITECTURES = {
|
||||||
|
|
||||||
V = {
|
V = {
|
||||||
"BROTLI": "1.1.0",
|
"BROTLI": "1.1.0",
|
||||||
"FREETYPE": "2.13.3",
|
"FREETYPE": "2.14.1",
|
||||||
"FRIBIDI": "1.0.16",
|
"FRIBIDI": "1.0.16",
|
||||||
"HARFBUZZ": "11.4.5",
|
"HARFBUZZ": "11.4.5",
|
||||||
"JPEGTURBO": "3.1.2",
|
"JPEGTURBO": "3.1.2",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user