From f9083264ff561389ee5931598df9bffe269db504 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 12 Apr 2025 20:56:35 +0300 Subject: [PATCH 01/36] 11.3.0.dev0 version bump --- src/PIL/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/_version.py b/src/PIL/_version.py index 9380e9927..ac678c7d2 100644 --- a/src/PIL/_version.py +++ b/src/PIL/_version.py @@ -1,4 +1,4 @@ # Master version for Pillow from __future__ import annotations -__version__ = "11.2.1" +__version__ = "11.3.0.dev0" From 529402143826732973463104000fd91d0a271103 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 3 Apr 2025 12:09:46 +1100 Subject: [PATCH 02/36] Removed Fedora 40 --- .github/workflows/test-docker.yml | 1 - docs/installation/platform-support.rst | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml index 25aef55fb..9e42ed884 100644 --- a/.github/workflows/test-docker.yml +++ b/.github/workflows/test-docker.yml @@ -47,7 +47,6 @@ jobs: centos-stream-10-amd64, debian-12-bookworm-x86, debian-12-bookworm-amd64, - fedora-40-amd64, fedora-41-amd64, gentoo, ubuntu-22.04-jammy-amd64, diff --git a/docs/installation/platform-support.rst b/docs/installation/platform-support.rst index 9eafad3c4..36b9a7bdd 100644 --- a/docs/installation/platform-support.rst +++ b/docs/installation/platform-support.rst @@ -31,8 +31,6 @@ These platforms are built and tested for every change. +----------------------------------+----------------------------+---------------------+ | Debian 12 Bookworm | 3.11 | x86, x86-64 | +----------------------------------+----------------------------+---------------------+ -| Fedora 40 | 3.12 | x86-64 | -+----------------------------------+----------------------------+---------------------+ | Fedora 41 | 3.13 | x86-64 | +----------------------------------+----------------------------+---------------------+ | Gentoo | 3.12 | x86-64 | From 4716bb78189108ceffcc80db226fe099cca20448 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Sun, 13 Apr 2025 23:59:05 +1000 Subject: [PATCH 03/36] Update macOS tested Pillow versions (#8890) --- docs/installation/platform-support.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/platform-support.rst b/docs/installation/platform-support.rst index 36b9a7bdd..ca810dc2a 100644 --- a/docs/installation/platform-support.rst +++ b/docs/installation/platform-support.rst @@ -71,7 +71,7 @@ These platforms have been reported to work at the versions mentioned. | Operating system | | Tested Python | | Latest tested | | Tested | | | | versions | | Pillow version | | processors | +==================================+============================+==================+==============+ -| macOS 15 Sequoia | 3.9, 3.10, 3.11, 3.12, 3.13| 11.1.0 |arm | +| macOS 15 Sequoia | 3.9, 3.10, 3.11, 3.12, 3.13| 11.2.1 |arm | | +----------------------------+------------------+ | | | 3.8 | 10.4.0 | | +----------------------------------+----------------------------+------------------+--------------+ From 8b1777b9997a48cd59a3bddd888bebddd8adc6de Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Mon, 14 Apr 2025 14:51:01 -0400 Subject: [PATCH 04/36] Move XV Thumbnails to read only section --- docs/handbook/image-file-formats.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst index 49431b3d0..46fe8b630 100644 --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -1664,6 +1664,11 @@ The :py:meth:`~PIL.Image.open` method sets the following Transparency color index. This key is omitted if the image is not transparent. +XV Thumbnails +^^^^^^^^^^^^^ + +Pillow can read XV thumbnail files. + Write-only formats ------------------ @@ -1769,11 +1774,6 @@ The :py:meth:`~PIL.Image.Image.save` method can take the following keyword argum .. versionadded:: 5.3.0 -XV Thumbnails -^^^^^^^^^^^^^ - -Pillow can read XV thumbnail files. - Identify-only formats --------------------- From 507fefbce4c3b8c46c6c21483d488884f1b5a8e1 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Tue, 15 Apr 2025 21:02:35 +1000 Subject: [PATCH 05/36] Python 3.13 is tested on Arch (#8894) --- docs/installation/platform-support.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/platform-support.rst b/docs/installation/platform-support.rst index ca810dc2a..d5634b384 100644 --- a/docs/installation/platform-support.rst +++ b/docs/installation/platform-support.rst @@ -23,7 +23,7 @@ These platforms are built and tested for every change. +----------------------------------+----------------------------+---------------------+ | Amazon Linux 2023 | 3.9 | x86-64 | +----------------------------------+----------------------------+---------------------+ -| Arch | 3.12 | x86-64 | +| Arch | 3.13 | x86-64 | +----------------------------------+----------------------------+---------------------+ | CentOS Stream 9 | 3.9 | x86-64 | +----------------------------------+----------------------------+---------------------+ From 6ea7dc8eeafaf7528d2817bdd443de367eca2940 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:06:52 +1000 Subject: [PATCH 06/36] Add Fedora 42 (#8899) --- .github/workflows/test-docker.yml | 1 + docs/installation/platform-support.rst | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml index 9e42ed884..0b90732eb 100644 --- a/.github/workflows/test-docker.yml +++ b/.github/workflows/test-docker.yml @@ -48,6 +48,7 @@ jobs: debian-12-bookworm-x86, debian-12-bookworm-amd64, fedora-41-amd64, + fedora-42-amd64, gentoo, ubuntu-22.04-jammy-amd64, ubuntu-24.04-noble-amd64, diff --git a/docs/installation/platform-support.rst b/docs/installation/platform-support.rst index d5634b384..d751620fd 100644 --- a/docs/installation/platform-support.rst +++ b/docs/installation/platform-support.rst @@ -33,6 +33,8 @@ These platforms are built and tested for every change. +----------------------------------+----------------------------+---------------------+ | Fedora 41 | 3.13 | x86-64 | +----------------------------------+----------------------------+---------------------+ +| Fedora 42 | 3.13 | x86-64 | ++----------------------------------+----------------------------+---------------------+ | Gentoo | 3.12 | x86-64 | +----------------------------------+----------------------------+---------------------+ | macOS 13 Ventura | 3.9 | x86-64 | From f630ec097b4d5d2a132d4ade5e5b903452bf27d8 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Wed, 16 Apr 2025 21:05:08 +1000 Subject: [PATCH 07/36] Build Windows arm64 wheels on arm64 runner (#8898) --- .github/workflows/wheels.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 40d3dc7e8..33e1976f0 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -121,14 +121,17 @@ jobs: windows: if: github.event_name != 'schedule' || github.repository_owner == 'python-pillow' name: Windows ${{ matrix.cibw_arch }} - runs-on: windows-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - cibw_arch: x86 + os: windows-latest - cibw_arch: AMD64 + os: windows-latest - cibw_arch: ARM64 + os: windows-11-arm steps: - uses: actions/checkout@v4 with: From 3d4119521c853e1014012f73fdf9b2a8dc137722 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Thu, 17 Apr 2025 01:49:57 +1000 Subject: [PATCH 08/36] Close file pointer earlier (#8895) --- Tests/test_file_bmp.py | 12 ++++++------ Tests/test_file_jpeg2k.py | 4 ++-- Tests/test_file_libtiff.py | 12 ++++++------ Tests/test_file_libtiff_small.py | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py index 757650711..746b2e180 100644 --- a/Tests/test_file_bmp.py +++ b/Tests/test_file_bmp.py @@ -190,9 +190,9 @@ def test_rle8() -> None: # Signal end of bitmap before the image is finished with open("Tests/images/bmp/g/pal8rle.bmp", "rb") as fp: data = fp.read(1063) + b"\x01" - with Image.open(io.BytesIO(data)) as im: - with pytest.raises(ValueError): - im.load() + with Image.open(io.BytesIO(data)) as im: + with pytest.raises(ValueError): + im.load() def test_rle4() -> None: @@ -214,9 +214,9 @@ def test_rle4() -> None: def test_rle8_eof(file_name: str, length: int) -> None: with open(file_name, "rb") as fp: data = fp.read(length) - with Image.open(io.BytesIO(data)) as im: - with pytest.raises(ValueError): - im.load() + with Image.open(io.BytesIO(data)) as im: + with pytest.raises(ValueError): + im.load() def test_offset() -> None: diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py index 4095bfaf2..a5365a90d 100644 --- a/Tests/test_file_jpeg2k.py +++ b/Tests/test_file_jpeg2k.py @@ -457,8 +457,8 @@ def test_comment() -> None: # Test an image that is truncated partway through a codestream with open("Tests/images/comment.jp2", "rb") as fp: b = BytesIO(fp.read(130)) - with Image.open(b) as im: - pass + with Image.open(b) as im: + pass def test_save_comment(card: ImageFile.ImageFile) -> None: diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 9916215fb..1ec39eba5 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -81,7 +81,7 @@ class TestFileLibTiff(LibTiffTestCase): s = io.BytesIO() with open(test_file, "rb") as f: s.write(f.read()) - s.seek(0) + s.seek(0) with Image.open(s) as im: assert im.size == (500, 500) self._assert_noerr(tmp_path, im) @@ -1050,12 +1050,12 @@ class TestFileLibTiff(LibTiffTestCase): with open("Tests/images/old-style-jpeg-compression.tif", "rb") as fp: data = fp.read() - # Set EXIF Orientation to 2 - data = data[:102] + b"\x02" + data[103:] + # Set EXIF Orientation to 2 + data = data[:102] + b"\x02" + data[103:] - with Image.open(io.BytesIO(data)) as im: - im = im.transpose(Image.Transpose.FLIP_LEFT_RIGHT) - assert_image_equal_tofile(im, "Tests/images/old-style-jpeg-compression.png") + with Image.open(io.BytesIO(data)) as im: + im = im.transpose(Image.Transpose.FLIP_LEFT_RIGHT) + assert_image_equal_tofile(im, "Tests/images/old-style-jpeg-compression.png") def test_open_missing_samplesperpixel(self) -> None: with Image.open( diff --git a/Tests/test_file_libtiff_small.py b/Tests/test_file_libtiff_small.py index 617e1e89c..65ba80c20 100644 --- a/Tests/test_file_libtiff_small.py +++ b/Tests/test_file_libtiff_small.py @@ -32,7 +32,7 @@ class TestFileLibTiffSmall(LibTiffTestCase): s = BytesIO() with open(test_file, "rb") as f: s.write(f.read()) - s.seek(0) + s.seek(0) with Image.open(s) as im: assert im.size == (128, 128) self._assert_noerr(tmp_path, im) From ccc4668d4ed27754a09f819462732dc42c584fc0 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 17 Apr 2025 08:04:34 +1000 Subject: [PATCH 09/36] Updated harfbuzz to 11.1.0 --- .github/workflows/wheels-dependencies.sh | 2 +- winbuild/build_prepare.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index 0df22c4cb..d53cf059b 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -38,7 +38,7 @@ ARCHIVE_SDIR=pillow-depends-main # Package versions for fresh source builds FREETYPE_VERSION=2.13.3 -HARFBUZZ_VERSION=11.0.1 +HARFBUZZ_VERSION=11.1.0 LIBPNG_VERSION=1.6.47 JPEGTURBO_VERSION=3.1.0 OPENJPEG_VERSION=2.5.3 diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 3e75c1411..17fc37572 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -113,7 +113,7 @@ V = { "BROTLI": "1.1.0", "FREETYPE": "2.13.3", "FRIBIDI": "1.0.16", - "HARFBUZZ": "11.0.1", + "HARFBUZZ": "11.1.0", "JPEGTURBO": "3.1.0", "LCMS2": "2.17", "LIBAVIF": "1.2.1", From 00ae9dda35e512e3bdfa69daff1625fd006cff21 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 18 Apr 2025 18:49:11 +1000 Subject: [PATCH 10/36] Changed harfbuzz buildtype to minsize --- .github/workflows/wheels-dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index d53cf059b..a4592871f 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -92,7 +92,7 @@ function build_harfbuzz { local out_dir=$(fetch_unpack https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/harfbuzz-$HARFBUZZ_VERSION.tar.xz harfbuzz-$HARFBUZZ_VERSION.tar.xz) (cd $out_dir \ - && meson setup build --prefix=$BUILD_PREFIX --libdir=$BUILD_PREFIX/lib --buildtype=release -Dfreetype=enabled -Dglib=disabled -Dtests=disabled) + && meson setup build --prefix=$BUILD_PREFIX --libdir=$BUILD_PREFIX/lib --buildtype=minsize -Dfreetype=enabled -Dglib=disabled -Dtests=disabled) (cd $out_dir/build \ && meson install) touch harfbuzz-stamp From cf48bbf0c48f871ecd62fb473611a7e2552580d9 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 19 Apr 2025 20:26:03 +1000 Subject: [PATCH 11/36] Removed indentation from list --- docs/handbook/concepts.rst | 44 +++++++++++++++--------------- docs/reference/block_allocator.rst | 18 ++++++------ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/handbook/concepts.rst b/docs/handbook/concepts.rst index 7da1078c1..fe874a740 100644 --- a/docs/handbook/concepts.rst +++ b/docs/handbook/concepts.rst @@ -30,35 +30,35 @@ image. Each pixel uses the full range of the bit depth. So a 1-bit pixel has a r INT32 and a 32-bit floating point pixel has the range of FLOAT32. The current release supports the following standard modes: - * ``1`` (1-bit pixels, black and white, stored with one pixel per byte) - * ``L`` (8-bit pixels, grayscale) - * ``P`` (8-bit pixels, mapped to any other mode using a color palette) - * ``RGB`` (3x8-bit pixels, true color) - * ``RGBA`` (4x8-bit pixels, true color with transparency mask) - * ``CMYK`` (4x8-bit pixels, color separation) - * ``YCbCr`` (3x8-bit pixels, color video format) +* ``1`` (1-bit pixels, black and white, stored with one pixel per byte) +* ``L`` (8-bit pixels, grayscale) +* ``P`` (8-bit pixels, mapped to any other mode using a color palette) +* ``RGB`` (3x8-bit pixels, true color) +* ``RGBA`` (4x8-bit pixels, true color with transparency mask) +* ``CMYK`` (4x8-bit pixels, color separation) +* ``YCbCr`` (3x8-bit pixels, color video format) - * Note that this refers to the JPEG, and not the ITU-R BT.2020, standard + * Note that this refers to the JPEG, and not the ITU-R BT.2020, standard - * ``LAB`` (3x8-bit pixels, the L*a*b color space) - * ``HSV`` (3x8-bit pixels, Hue, Saturation, Value color space) +* ``LAB`` (3x8-bit pixels, the L*a*b color space) +* ``HSV`` (3x8-bit pixels, Hue, Saturation, Value color space) - * Hue's range of 0-255 is a scaled version of 0 degrees <= Hue < 360 degrees + * Hue's range of 0-255 is a scaled version of 0 degrees <= Hue < 360 degrees - * ``I`` (32-bit signed integer pixels) - * ``F`` (32-bit floating point pixels) +* ``I`` (32-bit signed integer pixels) +* ``F`` (32-bit floating point pixels) Pillow also provides limited support for a few additional modes, including: - * ``LA`` (L with alpha) - * ``PA`` (P with alpha) - * ``RGBX`` (true color with padding) - * ``RGBa`` (true color with premultiplied alpha) - * ``La`` (L with premultiplied alpha) - * ``I;16`` (16-bit unsigned integer pixels) - * ``I;16L`` (16-bit little endian unsigned integer pixels) - * ``I;16B`` (16-bit big endian unsigned integer pixels) - * ``I;16N`` (16-bit native endian unsigned integer pixels) +* ``LA`` (L with alpha) +* ``PA`` (P with alpha) +* ``RGBX`` (true color with padding) +* ``RGBa`` (true color with premultiplied alpha) +* ``La`` (L with premultiplied alpha) +* ``I;16`` (16-bit unsigned integer pixels) +* ``I;16L`` (16-bit little endian unsigned integer pixels) +* ``I;16B`` (16-bit big endian unsigned integer pixels) +* ``I;16N`` (16-bit native endian unsigned integer pixels) Premultiplied alpha is where the values for each other channel have been multiplied by the alpha. For example, an RGBA pixel of ``(10, 20, 30, 127)`` diff --git a/docs/reference/block_allocator.rst b/docs/reference/block_allocator.rst index f4d27e24e..c6be5b7e6 100644 --- a/docs/reference/block_allocator.rst +++ b/docs/reference/block_allocator.rst @@ -37,14 +37,14 @@ fresh allocation. This caching of free blocks is currently disabled by default, but can be enabled and tweaked using three environment variables: - * ``PILLOW_ALIGNMENT``, in bytes. Specifies the alignment of memory - allocations. Valid values are powers of 2 between 1 and - 128, inclusive. Defaults to 1. +* ``PILLOW_ALIGNMENT``, in bytes. Specifies the alignment of memory + allocations. Valid values are powers of 2 between 1 and + 128, inclusive. Defaults to 1. - * ``PILLOW_BLOCK_SIZE``, in bytes, K, or M. Specifies the maximum - block size for ``ImagingAllocateArray``. Valid values are - integers, with an optional ``k`` or ``m`` suffix. Defaults to 16M. +* ``PILLOW_BLOCK_SIZE``, in bytes, K, or M. Specifies the maximum + block size for ``ImagingAllocateArray``. Valid values are + integers, with an optional ``k`` or ``m`` suffix. Defaults to 16M. - * ``PILLOW_BLOCKS_MAX`` Specifies the number of freed blocks to - retain to fill future memory requests. Any freed blocks over this - threshold will be returned to the OS immediately. Defaults to 0. +* ``PILLOW_BLOCKS_MAX`` Specifies the number of freed blocks to + retain to fill future memory requests. Any freed blocks over this + threshold will be returned to the OS immediately. Defaults to 0. From 03e7871afdb8f558cddc10cc9013e1db143298d9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:18:01 +0300 Subject: [PATCH 12/36] Add `make [-C docs] htmllive` to rebuild and reload HTML files (#8913) Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- Makefile | 5 +++++ docs/Guardfile | 10 ---------- docs/Makefile | 9 +++++---- pyproject.toml | 1 + 4 files changed, 11 insertions(+), 14 deletions(-) delete mode 100755 docs/Guardfile diff --git a/Makefile b/Makefile index 53164b08a..5a8152454 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,10 @@ doc html: htmlview: $(MAKE) -C docs htmlview +.PHONY: htmllive +htmllive: + $(MAKE) -C docs htmllive + .PHONY: doccheck doccheck: $(MAKE) doc @@ -43,6 +47,7 @@ help: @echo " docserve run an HTTP server on the docs directory" @echo " html make HTML docs" @echo " htmlview open the index page built by the html target in your browser" + @echo " htmllive rebuild and reload HTML files in your browser" @echo " install make and install" @echo " install-coverage make and install with C coverage" @echo " lint run the lint checks" diff --git a/docs/Guardfile b/docs/Guardfile deleted file mode 100755 index 16a891a73..000000000 --- a/docs/Guardfile +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -from livereload.compiler import shell -from livereload.task import Task - -Task.add("*.rst", shell("make html")) -Task.add("*/*.rst", shell("make html")) -Task.add("Makefile", shell("make html")) -Task.add("conf.py", shell("make html")) diff --git a/docs/Makefile b/docs/Makefile index e90af0519..4412fc806 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -20,8 +20,8 @@ help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " htmlview to open the index page built by the html target in your browser" + @echo " htmllive to rebuild and reload HTML files in your browser" @echo " serve to start a local server for viewing docs" - @echo " livehtml to start a local server for viewing docs and auto-reload on change" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @@ -201,9 +201,10 @@ doctest: htmlview: html $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('$(BUILDDIR)/html/index.html'))" -.PHONY: livehtml -livehtml: html - livereload $(BUILDDIR)/html -p 33233 +.PHONY: htmllive +htmllive: SPHINXBUILD = $(PYTHON) -m sphinx_autobuild +htmllive: SPHINXOPTS = --open-browser --delay 0 +htmllive: html .PHONY: serve serve: diff --git a/pyproject.toml b/pyproject.toml index e8e76796a..a3ff9723b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ optional-dependencies.docs = [ "furo", "olefile", "sphinx>=8.2", + "sphinx-autobuild", "sphinx-copybutton", "sphinx-inline-tabs", "sphinxext-opengraph", From 4402797b35137666413efcc04fb91064e846cd90 Mon Sep 17 00:00:00 2001 From: Adian Kozlica <105174725+AdianKozlica@users.noreply.github.com> Date: Mon, 21 Apr 2025 04:36:40 +0200 Subject: [PATCH 13/36] Add support for Grim in Wayland sessions ImageGrab (#8912) Co-authored-by: Andrew Murray --- Tests/test_imagegrab.py | 1 + docs/reference/ImageGrab.rst | 6 +++--- src/PIL/ImageGrab.py | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index 5f51171f1..01fa090dc 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -43,6 +43,7 @@ class TestImageGrab: if ( sys.platform not in ("win32", "darwin") and not shutil.which("gnome-screenshot") + and not shutil.which("grim") and not shutil.which("spectacle") ): with pytest.raises(OSError) as e: diff --git a/docs/reference/ImageGrab.rst b/docs/reference/ImageGrab.rst index 1e827a676..0fd8f68df 100644 --- a/docs/reference/ImageGrab.rst +++ b/docs/reference/ImageGrab.rst @@ -16,9 +16,9 @@ or the clipboard to a PIL image memory. the entire screen is copied, and on macOS, it will be at 2x if on a Retina screen. On Linux, if ``xdisplay`` is ``None`` and the default X11 display does not return - a snapshot of the screen, ``gnome-screenshot`` or ``spectacle`` will be used as a - fallback if they are installed. To disable this behaviour, pass ``xdisplay=""`` - instead. + a snapshot of the screen, ``gnome-screenshot``, ``grim`` or ``spectacle`` will be + used as a fallback if they are installed. To disable this behaviour, pass + ``xdisplay=""`` instead. .. versionadded:: 1.1.3 (Windows), 3.0.0 (macOS), 7.1.0 (Linux) diff --git a/src/PIL/ImageGrab.py b/src/PIL/ImageGrab.py index 4da14f8e4..c29350b7a 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -89,6 +89,8 @@ def grab( if display_name is None and sys.platform not in ("darwin", "win32"): if shutil.which("gnome-screenshot"): args = ["gnome-screenshot", "-f"] + elif shutil.which("grim"): + args = ["grim"] elif shutil.which("spectacle"): args = ["spectacle", "-n", "-b", "-f", "-o"] else: From 8fe7a7aaf89a5f312fe60382c1c5196876f53452 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 21 Apr 2025 17:32:47 +1000 Subject: [PATCH 14/36] Update redirected URL --- docs/releasenotes/10.1.0.rst | 2 +- src/PIL/ImageFont.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/releasenotes/10.1.0.rst b/docs/releasenotes/10.1.0.rst index fd556bdf1..e4efb069e 100644 --- a/docs/releasenotes/10.1.0.rst +++ b/docs/releasenotes/10.1.0.rst @@ -71,7 +71,7 @@ size and font_size arguments when using default font Pillow has had a "better than nothing" default font, which can only be drawn at one font size. Now, if FreeType support is available, a version of -`Aileron Regular `_ is loaded, which can be +`Aileron Regular `_ is loaded, which can be drawn at chosen font sizes. The following ``size`` and ``font_size`` arguments can now be used to specify a diff --git a/src/PIL/ImageFont.py b/src/PIL/ImageFont.py index ebe510ba9..329c463ff 100644 --- a/src/PIL/ImageFont.py +++ b/src/PIL/ImageFont.py @@ -1093,7 +1093,7 @@ w7IkEbzhVQAAAABJRU5ErkJggg== def load_default(size: float | None = None) -> FreeTypeFont | ImageFont: """If FreeType support is available, load a version of Aileron Regular, - https://dotcolon.net/font/aileron, with a more limited character set. + https://dotcolon.net/fonts/aileron, with a more limited character set. Otherwise, load a "better than nothing" font. From d03ce3d235c9a80fb5a336634115a331749af9f8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 21 Apr 2025 11:22:03 +0300 Subject: [PATCH 15/36] Docs: remove unused Makefile targets (#8917) Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- docs/Makefile | 135 -------------------------------------------------- docs/conf.py | 91 ---------------------------------- docs/make.bat | 123 --------------------------------------------- 3 files changed, 349 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 4412fc806..1e6c06ede 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -24,22 +24,7 @@ help: @echo " serve to start a local server for viewing docs" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" .PHONY: clean clean: @@ -69,119 +54,6 @@ singlehtml: @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." -.PHONY: pickle -pickle: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PillowPILfork.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PillowPILfork.qhc" - -.PHONY: devhelp -devhelp: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/PillowPILfork" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PillowPILfork" - @echo "# devhelp" - -.PHONY: epub -epub: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: latex -latex: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - .PHONY: linkcheck linkcheck: $(MAKE) install-sphinx @@ -190,13 +62,6 @@ linkcheck: @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." -.PHONY: doctest -doctest: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - .PHONY: htmlview htmlview: html $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('$(BUILDDIR)/html/index.html'))" diff --git a/docs/conf.py b/docs/conf.py index bfbcf9151..040301433 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -229,97 +229,6 @@ html_js_files = [ # implements a search results scorer. If empty, the default will be used. # html_search_scorer = 'scorer.js' -# Output file base name for HTML help builder. -htmlhelp_basename = "PillowPILForkdoc" - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements: dict[str, str] = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # 'preamble': '', - # Latex figure (float) alignment - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ( - master_doc, - "PillowPILFork.tex", - "Pillow (PIL Fork) Documentation", - "Jeffrey A. Clark", - "manual", - ) -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, "pillowpilfork", "Pillow (PIL Fork) Documentation", [author], 1) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ( - master_doc, - "PillowPILFork", - "Pillow (PIL Fork) Documentation", - author, - "PillowPILFork", - "Pillow is the friendly PIL fork by Jeffrey A. Clark and contributors.", - "Miscellaneous", - ) -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False - linkcheck_allowed_redirects = { r"https://www.bestpractices.dev/projects/6331": r"https://www.bestpractices.dev/en/.*", diff --git a/docs/make.bat b/docs/make.bat index 0ed5ee1a5..4126f786b 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -22,20 +22,7 @@ if "%1" == "help" ( echo. htmlview to open the index page built by the html target in your browser echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled goto end ) @@ -80,107 +67,6 @@ if "%1" == "singlehtml" ( goto end ) -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\PillowPILfork.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PillowPILfork.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 @@ -190,13 +76,4 @@ or in %BUILDDIR%/linkcheck/output.txt. goto end ) -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - :end From 348589a367bba81bd9e2d1f4b6280ada91caae2e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 21 Apr 2025 12:03:31 +0300 Subject: [PATCH 16/36] Docs: use sentence case for headers (#8914) Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- Tests/README.rst | 2 +- docs/PIL.rst | 32 +++---- docs/deprecations.rst | 2 +- docs/handbook/concepts.rst | 2 +- docs/handbook/image-file-formats.rst | 4 +- docs/handbook/overview.rst | 6 +- docs/handbook/tutorial.rst | 4 +- .../writing-your-own-image-plugin.rst | 6 +- docs/installation.rst | 10 +- docs/installation/basic-installation.rst | 2 +- docs/installation/building-from-source.rst | 8 +- docs/installation/platform-support.rst | 6 +- docs/installation/python-support.rst | 2 +- docs/reference/ExifTags.rst | 2 +- docs/reference/Image.rst | 6 +- docs/reference/ImageChops.rst | 2 +- docs/reference/ImageCms.rst | 2 +- docs/reference/ImageColor.rst | 4 +- docs/reference/ImageDraw.rst | 8 +- docs/reference/ImageEnhance.rst | 2 +- docs/reference/ImageFile.rst | 2 +- docs/reference/ImageFilter.rst | 2 +- docs/reference/ImageFont.rst | 2 +- docs/reference/ImageGrab.rst | 2 +- docs/reference/ImageMath.rst | 10 +- docs/reference/ImageMorph.rst | 2 +- docs/reference/ImageOps.rst | 2 +- docs/reference/ImagePalette.rst | 2 +- docs/reference/ImagePath.rst | 2 +- docs/reference/ImageQt.rst | 2 +- docs/reference/ImageSequence.rst | 2 +- docs/reference/ImageShow.rst | 4 +- docs/reference/ImageStat.rst | 2 +- docs/reference/ImageTk.rst | 2 +- docs/reference/ImageTransform.rst | 2 +- docs/reference/ImageWin.rst | 2 +- docs/reference/JpegPresets.rst | 2 +- docs/reference/PSDraw.rst | 2 +- docs/reference/PixelAccess.rst | 4 +- docs/reference/TiffTags.rst | 2 +- docs/reference/arrow_support.rst | 10 +- docs/reference/block_allocator.rst | 8 +- docs/reference/c_extension_debugging.rst | 8 +- docs/reference/features.rst | 2 +- docs/reference/internal_design.rst | 2 +- docs/reference/internal_modules.rst | 16 ++-- docs/reference/limits.rst | 6 +- docs/reference/open_files.rst | 6 +- docs/reference/plugins.rst | 92 +++++++++---------- docs/releasenotes/10.0.0.rst | 8 +- docs/releasenotes/10.0.1.rst | 2 +- docs/releasenotes/10.1.0.rst | 6 +- docs/releasenotes/10.2.0.rst | 6 +- docs/releasenotes/10.3.0.rst | 6 +- docs/releasenotes/10.4.0.rst | 4 +- docs/releasenotes/11.0.0.rst | 12 +-- docs/releasenotes/11.1.0.rst | 6 +- docs/releasenotes/11.2.1.rst | 6 +- docs/releasenotes/2.7.0.rst | 6 +- docs/releasenotes/3.0.0.rst | 12 +-- docs/releasenotes/3.1.0.rst | 4 +- docs/releasenotes/3.2.0.rst | 4 +- docs/releasenotes/3.3.0.rst | 4 +- docs/releasenotes/3.3.2.rst | 4 +- docs/releasenotes/3.4.0.rst | 8 +- docs/releasenotes/4.0.0.rst | 2 +- docs/releasenotes/4.1.0.rst | 10 +- docs/releasenotes/4.1.1.rst | 2 +- docs/releasenotes/4.2.0.rst | 12 +-- docs/releasenotes/4.2.1.rst | 2 +- docs/releasenotes/4.3.0.rst | 26 +++--- docs/releasenotes/5.0.0.rst | 22 ++--- docs/releasenotes/5.1.0.rst | 10 +- docs/releasenotes/5.2.0.rst | 6 +- docs/releasenotes/5.3.0.rst | 6 +- docs/releasenotes/5.4.0.rst | 4 +- docs/releasenotes/6.0.0.rst | 8 +- docs/releasenotes/6.1.0.rst | 4 +- docs/releasenotes/6.2.0.rst | 6 +- docs/releasenotes/6.2.1.rst | 4 +- docs/releasenotes/7.0.0.rst | 6 +- docs/releasenotes/7.1.0.rst | 6 +- docs/releasenotes/7.2.0.rst | 2 +- docs/releasenotes/8.0.0.rst | 8 +- docs/releasenotes/8.1.0.rst | 6 +- docs/releasenotes/8.1.1.rst | 2 +- docs/releasenotes/8.2.0.rst | 6 +- docs/releasenotes/8.3.0.rst | 6 +- docs/releasenotes/8.3.2.rst | 2 +- docs/releasenotes/8.4.0.rst | 4 +- docs/releasenotes/9.0.0.rst | 8 +- docs/releasenotes/9.0.1.rst | 2 +- docs/releasenotes/9.1.0.rst | 6 +- docs/releasenotes/9.2.0.rst | 4 +- docs/releasenotes/9.3.0.rst | 4 +- docs/releasenotes/9.4.0.rst | 4 +- docs/releasenotes/9.5.0.rst | 4 +- docs/releasenotes/index.rst | 2 +- docs/releasenotes/template.rst | 8 +- 99 files changed, 313 insertions(+), 313 deletions(-) diff --git a/Tests/README.rst b/Tests/README.rst index 2d014e5a4..a955ec4fa 100644 --- a/Tests/README.rst +++ b/Tests/README.rst @@ -1,4 +1,4 @@ -Pillow Tests +Pillow tests ============ Test scripts are named ``test_xxx.py``. Helper classes and functions can be found in ``helper.py``. diff --git a/docs/PIL.rst b/docs/PIL.rst index bdbf1373d..5225e9644 100644 --- a/docs/PIL.rst +++ b/docs/PIL.rst @@ -1,10 +1,10 @@ -PIL Package (autodoc of remaining modules) +PIL package (autodoc of remaining modules) ========================================== Reference for modules whose documentation has not yet been ported or written can be found here. -:mod:`PIL` Module +:mod:`PIL` module ----------------- .. py:module:: PIL @@ -12,7 +12,7 @@ can be found here. .. autoexception:: UnidentifiedImageError :show-inheritance: -:mod:`~PIL.BdfFontFile` Module +:mod:`~PIL.BdfFontFile` module ------------------------------ .. automodule:: PIL.BdfFontFile @@ -20,7 +20,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.ContainerIO` Module +:mod:`~PIL.ContainerIO` module ------------------------------ .. automodule:: PIL.ContainerIO @@ -28,7 +28,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.FontFile` Module +:mod:`~PIL.FontFile` module --------------------------- .. automodule:: PIL.FontFile @@ -36,7 +36,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.GdImageFile` Module +:mod:`~PIL.GdImageFile` module ------------------------------ .. automodule:: PIL.GdImageFile @@ -44,7 +44,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.GimpGradientFile` Module +:mod:`~PIL.GimpGradientFile` module ----------------------------------- .. automodule:: PIL.GimpGradientFile @@ -52,7 +52,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.GimpPaletteFile` Module +:mod:`~PIL.GimpPaletteFile` module ---------------------------------- .. automodule:: PIL.GimpPaletteFile @@ -60,7 +60,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.ImageDraw2` Module +:mod:`~PIL.ImageDraw2` module ----------------------------- .. automodule:: PIL.ImageDraw2 @@ -69,7 +69,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.ImageMode` Module +:mod:`~PIL.ImageMode` module ---------------------------- .. automodule:: PIL.ImageMode @@ -77,7 +77,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.PaletteFile` Module +:mod:`~PIL.PaletteFile` module ------------------------------ .. automodule:: PIL.PaletteFile @@ -85,7 +85,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.PcfFontFile` Module +:mod:`~PIL.PcfFontFile` module ------------------------------ .. automodule:: PIL.PcfFontFile @@ -93,7 +93,7 @@ can be found here. :undoc-members: :show-inheritance: -:class:`.PngImagePlugin.iTXt` Class +:class:`.PngImagePlugin.iTXt` class ----------------------------------- .. autoclass:: PIL.PngImagePlugin.iTXt @@ -107,7 +107,7 @@ can be found here. :param lang: language code :param tkey: UTF-8 version of the key name -:class:`.PngImagePlugin.PngInfo` Class +:class:`.PngImagePlugin.PngInfo` class -------------------------------------- .. autoclass:: PIL.PngImagePlugin.PngInfo @@ -116,7 +116,7 @@ can be found here. :show-inheritance: -:mod:`~PIL.TarIO` Module +:mod:`~PIL.TarIO` module ------------------------ .. automodule:: PIL.TarIO @@ -124,7 +124,7 @@ can be found here. :undoc-members: :show-inheritance: -:mod:`~PIL.WalImageFile` Module +:mod:`~PIL.WalImageFile` module ------------------------------- .. automodule:: PIL.WalImageFile diff --git a/docs/deprecations.rst b/docs/deprecations.rst index 7f8e76bcc..0490ba439 100644 --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -155,7 +155,7 @@ JpegImageFile.huffman_ac and JpegImageFile.huffman_dc The ``huffman_ac`` and ``huffman_dc`` dictionaries on JPEG images were unused. They have been deprecated, and will be removed in Pillow 12 (2025-10-15). -Specific WebP Feature Checks +Specific WebP feature checks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. deprecated:: 11.0.0 diff --git a/docs/handbook/concepts.rst b/docs/handbook/concepts.rst index fe874a740..c9d3f5e91 100644 --- a/docs/handbook/concepts.rst +++ b/docs/handbook/concepts.rst @@ -84,7 +84,7 @@ pixels. .. _coordinate-system: -Coordinate System +Coordinate system ----------------- The Python Imaging Library uses a Cartesian pixel coordinate system, with (0,0) diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst index 46fe8b630..5ca549c37 100644 --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -1222,7 +1222,7 @@ numbers are returned as a tuple of ``(numerator, denominator)``. .. deprecated:: 3.0.0 -Reading Multi-frame TIFF Images +Reading multi-frame TIFF images ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The TIFF loader supports the :py:meth:`~PIL.Image.Image.seek` and @@ -1664,7 +1664,7 @@ The :py:meth:`~PIL.Image.open` method sets the following Transparency color index. This key is omitted if the image is not transparent. -XV Thumbnails +XV thumbnails ^^^^^^^^^^^^^ Pillow can read XV thumbnail files. diff --git a/docs/handbook/overview.rst b/docs/handbook/overview.rst index 17964d1c5..ab22b9807 100644 --- a/docs/handbook/overview.rst +++ b/docs/handbook/overview.rst @@ -13,7 +13,7 @@ processing tool. Let’s look at a few possible uses of this library. -Image Archives +Image archives -------------- The Python Imaging Library is ideal for image archival and batch processing @@ -24,7 +24,7 @@ The current version identifies and reads a large number of formats. Write support is intentionally restricted to the most commonly used interchange and presentation formats. -Image Display +Image display ------------- The current release includes Tk :py:class:`~PIL.ImageTk.PhotoImage` and @@ -36,7 +36,7 @@ support. For debugging, there’s also a :py:meth:`~PIL.Image.Image.show` method which saves an image to disk, and calls an external display utility. -Image Processing +Image processing ---------------- The library contains basic image processing functionality, including point operations, filtering with a set of built-in convolution kernels, and colour space conversions. diff --git a/docs/handbook/tutorial.rst b/docs/handbook/tutorial.rst index f1a2849b8..28c0abe44 100644 --- a/docs/handbook/tutorial.rst +++ b/docs/handbook/tutorial.rst @@ -122,7 +122,7 @@ This means that opening an image file is a fast operation, which is independent of the file size and compression type. Here’s a simple script to quickly identify a set of image files: -Identify Image Files +Identify image files ^^^^^^^^^^^^^^^^^^^^ :: @@ -399,7 +399,7 @@ Applying filters .. image:: enhanced_hopper.webp :align: center -Point Operations +Point operations ^^^^^^^^^^^^^^^^ The :py:meth:`~PIL.Image.Image.point` method can be used to translate the pixel diff --git a/docs/handbook/writing-your-own-image-plugin.rst b/docs/handbook/writing-your-own-image-plugin.rst index 9e7d14c57..21a9124d7 100644 --- a/docs/handbook/writing-your-own-image-plugin.rst +++ b/docs/handbook/writing-your-own-image-plugin.rst @@ -1,6 +1,6 @@ .. _image-plugins: -Writing Your Own Image Plugin +Writing your own image plugin ============================= Pillow uses a plugin model which allows you to add your own @@ -329,7 +329,7 @@ The fields are used as follows: .. _file-codecs: -Writing Your Own File Codec in C +Writing your own file codec in C ================================ There are 3 stages in a file codec's lifetime: @@ -414,7 +414,7 @@ memory and release any resources from external libraries. .. _file-codecs-py: -Writing Your Own File Codec in Python +Writing your own file codec in Python ===================================== Python file decoders and encoders should derive from diff --git a/docs/installation.rst b/docs/installation.rst index b4bf2fa00..03f18c195 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -3,27 +3,27 @@ Installation ============ -Basic Installation +Basic installation ------------------ .. Note:: This section has moved to :ref:`basic-installation`. Please update references accordingly. -Python Support +Python support -------------- .. Note:: This section has moved to :ref:`python-support`. Please update references accordingly. -Platform Support +Platform support ---------------- .. Note:: This section has moved to :ref:`platform-support`. Please update references accordingly. -Building From Source +Building from source -------------------- .. Note:: This section has moved to :ref:`building-from-source`. Please update references accordingly. -Old Versions +Old versions ------------ .. Note:: This section has moved to :ref:`old-versions`. Please update references accordingly. diff --git a/docs/installation/basic-installation.rst b/docs/installation/basic-installation.rst index 989f72ddd..f66ee8707 100644 --- a/docs/installation/basic-installation.rst +++ b/docs/installation/basic-installation.rst @@ -8,7 +8,7 @@ .. _basic-installation: -Basic Installation +Basic installation ================== .. note:: diff --git a/docs/installation/building-from-source.rst b/docs/installation/building-from-source.rst index 9ba389b66..c72568b20 100644 --- a/docs/installation/building-from-source.rst +++ b/docs/installation/building-from-source.rst @@ -8,12 +8,12 @@ .. _building-from-source: -Building From Source +Building from source ==================== .. _external-libraries: -External Libraries +External libraries ------------------ .. note:: @@ -271,7 +271,7 @@ After navigating to the Pillow directory, run:: .. _compressed archive from PyPI: https://pypi.org/project/pillow/#files -Build Options +Build options ^^^^^^^^^^^^^ * Config setting: ``-C parallel=n``. Can also be given @@ -319,7 +319,7 @@ Sample usage:: .. _old-versions: -Old Versions +Old versions ============ You can download old distributions from the `release history at PyPI diff --git a/docs/installation/platform-support.rst b/docs/installation/platform-support.rst index d751620fd..93486d034 100644 --- a/docs/installation/platform-support.rst +++ b/docs/installation/platform-support.rst @@ -1,6 +1,6 @@ .. _platform-support: -Platform Support +Platform support ================ Current platform support for Pillow. Binary distributions are @@ -9,7 +9,7 @@ should compile and run everywhere platform support is listed. In general, we aim to support all current versions of Linux, macOS, and Windows. -Continuous Integration Targets +Continuous integration targets ------------------------------ These platforms are built and tested for every change. @@ -59,7 +59,7 @@ These platforms are built and tested for every change. +----------------------------------+----------------------------+---------------------+ -Other Platforms +Other platforms --------------- These platforms have been reported to work at the versions mentioned. diff --git a/docs/installation/python-support.rst b/docs/installation/python-support.rst index dd5765b6b..7daee8afc 100644 --- a/docs/installation/python-support.rst +++ b/docs/installation/python-support.rst @@ -1,6 +1,6 @@ .. _python-support: -Python Support +Python support ============== Pillow supports these Python versions. diff --git a/docs/reference/ExifTags.rst b/docs/reference/ExifTags.rst index 06965ead3..e6bcd9d59 100644 --- a/docs/reference/ExifTags.rst +++ b/docs/reference/ExifTags.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ExifTags .. py:currentmodule:: PIL.ExifTags -:py:mod:`~PIL.ExifTags` Module +:py:mod:`~PIL.ExifTags` module ============================== The :py:mod:`~PIL.ExifTags` module exposes several :py:class:`enum.IntEnum` diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst index a3ba8cfd8..e68722900 100644 --- a/docs/reference/Image.rst +++ b/docs/reference/Image.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.Image .. py:currentmodule:: PIL.Image -:py:mod:`~PIL.Image` Module +:py:mod:`~PIL.Image` module =========================== The :py:mod:`~PIL.Image` module provides a class with the same name which is @@ -113,7 +113,7 @@ Registering plugins .. autofunction:: register_decoder .. autofunction:: register_encoder -The Image Class +The Image class --------------- .. autoclass:: PIL.Image.Image @@ -261,7 +261,7 @@ method. :: .. automethod:: PIL.Image.Image.load .. automethod:: PIL.Image.Image.close -Image Attributes +Image attributes ---------------- Instances of the :py:class:`Image` class have the following attributes: diff --git a/docs/reference/ImageChops.rst b/docs/reference/ImageChops.rst index 9519361a7..505181db6 100644 --- a/docs/reference/ImageChops.rst +++ b/docs/reference/ImageChops.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageChops .. py:currentmodule:: PIL.ImageChops -:py:mod:`~PIL.ImageChops` ("Channel Operations") Module +:py:mod:`~PIL.ImageChops` ("channel operations") module ======================================================= The :py:mod:`~PIL.ImageChops` module contains a number of arithmetical image diff --git a/docs/reference/ImageCms.rst b/docs/reference/ImageCms.rst index 4a1f5a3ee..238390e75 100644 --- a/docs/reference/ImageCms.rst +++ b/docs/reference/ImageCms.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageCms .. py:currentmodule:: PIL.ImageCms -:py:mod:`~PIL.ImageCms` Module +:py:mod:`~PIL.ImageCms` module ============================== The :py:mod:`~PIL.ImageCms` module provides color profile management diff --git a/docs/reference/ImageColor.rst b/docs/reference/ImageColor.rst index 31faeac78..68e228dba 100644 --- a/docs/reference/ImageColor.rst +++ b/docs/reference/ImageColor.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageColor .. py:currentmodule:: PIL.ImageColor -:py:mod:`~PIL.ImageColor` Module +:py:mod:`~PIL.ImageColor` module ================================ The :py:mod:`~PIL.ImageColor` module contains color tables and converters from @@ -11,7 +11,7 @@ others. .. _color-names: -Color Names +Color names ----------- The ImageColor module supports the following string formats: diff --git a/docs/reference/ImageDraw.rst b/docs/reference/ImageDraw.rst index bd6f6b048..6e73233a1 100644 --- a/docs/reference/ImageDraw.rst +++ b/docs/reference/ImageDraw.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageDraw .. py:currentmodule:: PIL.ImageDraw -:py:mod:`~PIL.ImageDraw` Module +:py:mod:`~PIL.ImageDraw` module =============================== The :py:mod:`~PIL.ImageDraw` module provides simple 2D graphics for @@ -54,7 +54,7 @@ later, you can also use RGB 3-tuples or color names (see below). The drawing layer will automatically assign color indexes, as long as you don’t draw with more than 256 colors. -Color Names +Color names ^^^^^^^^^^^ See :ref:`color-names` for the color names supported by Pillow. @@ -75,7 +75,7 @@ To load a OpenType/TrueType font, use the truetype function in the :py:mod:`~PIL.ImageFont` module. Note that this function depends on third-party libraries, and may not available in all PIL builds. -Example: Draw Partial Opacity Text +Example: Draw partial opacity text ---------------------------------- :: @@ -102,7 +102,7 @@ Example: Draw Partial Opacity Text out.show() -Example: Draw Multiline Text +Example: Draw multiline text ---------------------------- :: diff --git a/docs/reference/ImageEnhance.rst b/docs/reference/ImageEnhance.rst index 529acad4a..334d1d4b2 100644 --- a/docs/reference/ImageEnhance.rst +++ b/docs/reference/ImageEnhance.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageEnhance .. py:currentmodule:: PIL.ImageEnhance -:py:mod:`~PIL.ImageEnhance` Module +:py:mod:`~PIL.ImageEnhance` module ================================== The :py:mod:`~PIL.ImageEnhance` module contains a number of classes that can be used diff --git a/docs/reference/ImageFile.rst b/docs/reference/ImageFile.rst index 64abd71d1..043559352 100644 --- a/docs/reference/ImageFile.rst +++ b/docs/reference/ImageFile.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageFile .. py:currentmodule:: PIL.ImageFile -:py:mod:`~PIL.ImageFile` Module +:py:mod:`~PIL.ImageFile` module =============================== The :py:mod:`~PIL.ImageFile` module provides support functions for the image open diff --git a/docs/reference/ImageFilter.rst b/docs/reference/ImageFilter.rst index 5f2b6af7c..1c201cacc 100644 --- a/docs/reference/ImageFilter.rst +++ b/docs/reference/ImageFilter.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageFilter .. py:currentmodule:: PIL.ImageFilter -:py:mod:`~PIL.ImageFilter` Module +:py:mod:`~PIL.ImageFilter` module ================================= The :py:mod:`~PIL.ImageFilter` module contains definitions for a pre-defined set of diff --git a/docs/reference/ImageFont.rst b/docs/reference/ImageFont.rst index d9d9cac6e..8b2f92323 100644 --- a/docs/reference/ImageFont.rst +++ b/docs/reference/ImageFont.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageFont .. py:currentmodule:: PIL.ImageFont -:py:mod:`~PIL.ImageFont` Module +:py:mod:`~PIL.ImageFont` module =============================== The :py:mod:`~PIL.ImageFont` module defines a class with the same name. Instances of diff --git a/docs/reference/ImageGrab.rst b/docs/reference/ImageGrab.rst index 0fd8f68df..f6a2ec5bc 100644 --- a/docs/reference/ImageGrab.rst +++ b/docs/reference/ImageGrab.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageGrab .. py:currentmodule:: PIL.ImageGrab -:py:mod:`~PIL.ImageGrab` Module +:py:mod:`~PIL.ImageGrab` module =============================== The :py:mod:`~PIL.ImageGrab` module can be used to copy the contents of the screen diff --git a/docs/reference/ImageMath.rst b/docs/reference/ImageMath.rst index f4e1081e6..0ee49b150 100644 --- a/docs/reference/ImageMath.rst +++ b/docs/reference/ImageMath.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageMath .. py:currentmodule:: PIL.ImageMath -:py:mod:`~PIL.ImageMath` Module +:py:mod:`~PIL.ImageMath` module =============================== The :py:mod:`~PIL.ImageMath` module can be used to evaluate “image expressions”, that @@ -86,7 +86,7 @@ Expression syntax It is not recommended to process expressions without considering this. :py:meth:`lambda_eval` is a more secure alternative. -Standard Operators +Standard operators ^^^^^^^^^^^^^^^^^^ You can use standard arithmetical operators for addition (+), subtraction (-), @@ -102,7 +102,7 @@ an 8-bit image, the result will be a 32-bit floating point image. You can force conversion using the ``convert()``, ``float()``, and ``int()`` functions described below. -Bitwise Operators +Bitwise operators ^^^^^^^^^^^^^^^^^ The module also provides operations that operate on individual bits. This @@ -116,7 +116,7 @@ mask off unwanted bits. Bitwise operators don’t work on floating point images. -Logical Operators +Logical operators ^^^^^^^^^^^^^^^^^ Logical operators like ``and``, ``or``, and ``not`` work @@ -128,7 +128,7 @@ treated as true. Note that ``and`` and ``or`` return the last evaluated operand, while not always returns a boolean value. -Built-in Functions +Built-in functions ^^^^^^^^^^^^^^^^^^ These functions are applied to each individual pixel. diff --git a/docs/reference/ImageMorph.rst b/docs/reference/ImageMorph.rst index d4522a06a..30b89a54d 100644 --- a/docs/reference/ImageMorph.rst +++ b/docs/reference/ImageMorph.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageMorph .. py:currentmodule:: PIL.ImageMorph -:py:mod:`~PIL.ImageMorph` Module +:py:mod:`~PIL.ImageMorph` module ================================ The :py:mod:`~PIL.ImageMorph` module provides morphology operations on images. diff --git a/docs/reference/ImageOps.rst b/docs/reference/ImageOps.rst index fcaa3c8f6..1ecff09f0 100644 --- a/docs/reference/ImageOps.rst +++ b/docs/reference/ImageOps.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageOps .. py:currentmodule:: PIL.ImageOps -:py:mod:`~PIL.ImageOps` Module +:py:mod:`~PIL.ImageOps` module ============================== The :py:mod:`~PIL.ImageOps` module contains a number of ‘ready-made’ image diff --git a/docs/reference/ImagePalette.rst b/docs/reference/ImagePalette.rst index 72ccfac7d..42ce5cb13 100644 --- a/docs/reference/ImagePalette.rst +++ b/docs/reference/ImagePalette.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImagePalette .. py:currentmodule:: PIL.ImagePalette -:py:mod:`~PIL.ImagePalette` Module +:py:mod:`~PIL.ImagePalette` module ================================== The :py:mod:`~PIL.ImagePalette` module contains a class of the same name to diff --git a/docs/reference/ImagePath.rst b/docs/reference/ImagePath.rst index 23544b613..5f5606349 100644 --- a/docs/reference/ImagePath.rst +++ b/docs/reference/ImagePath.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImagePath .. py:currentmodule:: PIL.ImagePath -:py:mod:`~PIL.ImagePath` Module +:py:mod:`~PIL.ImagePath` module =============================== The :py:mod:`~PIL.ImagePath` module is used to store and manipulate 2-dimensional diff --git a/docs/reference/ImageQt.rst b/docs/reference/ImageQt.rst index 7e67a44d3..88d7b8a20 100644 --- a/docs/reference/ImageQt.rst +++ b/docs/reference/ImageQt.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageQt .. py:currentmodule:: PIL.ImageQt -:py:mod:`~PIL.ImageQt` Module +:py:mod:`~PIL.ImageQt` module ============================= The :py:mod:`~PIL.ImageQt` module contains support for creating PyQt6 or PySide6 diff --git a/docs/reference/ImageSequence.rst b/docs/reference/ImageSequence.rst index a27b2fb4e..0d6f394dd 100644 --- a/docs/reference/ImageSequence.rst +++ b/docs/reference/ImageSequence.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageSequence .. py:currentmodule:: PIL.ImageSequence -:py:mod:`~PIL.ImageSequence` Module +:py:mod:`~PIL.ImageSequence` module =================================== The :py:mod:`~PIL.ImageSequence` module contains a wrapper class that lets you diff --git a/docs/reference/ImageShow.rst b/docs/reference/ImageShow.rst index 5cedede69..12c8741ce 100644 --- a/docs/reference/ImageShow.rst +++ b/docs/reference/ImageShow.rst @@ -1,10 +1,10 @@ .. py:module:: PIL.ImageShow .. py:currentmodule:: PIL.ImageShow -:py:mod:`~PIL.ImageShow` Module +:py:mod:`~PIL.ImageShow` module =============================== -The :py:mod:`~PIL.ImageShow` Module is used to display images. +The :py:mod:`~PIL.ImageShow` module is used to display images. All default viewers convert the image to be shown to PNG format. .. autofunction:: PIL.ImageShow.show diff --git a/docs/reference/ImageStat.rst b/docs/reference/ImageStat.rst index f69466382..ede119920 100644 --- a/docs/reference/ImageStat.rst +++ b/docs/reference/ImageStat.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageStat .. py:currentmodule:: PIL.ImageStat -:py:mod:`~PIL.ImageStat` Module +:py:mod:`~PIL.ImageStat` module =============================== The :py:mod:`~PIL.ImageStat` module calculates global statistics for an image, or diff --git a/docs/reference/ImageTk.rst b/docs/reference/ImageTk.rst index 134ef5651..3ab72b83d 100644 --- a/docs/reference/ImageTk.rst +++ b/docs/reference/ImageTk.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageTk .. py:currentmodule:: PIL.ImageTk -:py:mod:`~PIL.ImageTk` Module +:py:mod:`~PIL.ImageTk` module ============================= The :py:mod:`~PIL.ImageTk` module contains support to create and modify Tkinter diff --git a/docs/reference/ImageTransform.rst b/docs/reference/ImageTransform.rst index 5b0a5ce49..530279934 100644 --- a/docs/reference/ImageTransform.rst +++ b/docs/reference/ImageTransform.rst @@ -2,7 +2,7 @@ .. py:module:: PIL.ImageTransform .. py:currentmodule:: PIL.ImageTransform -:py:mod:`~PIL.ImageTransform` Module +:py:mod:`~PIL.ImageTransform` module ==================================== The :py:mod:`~PIL.ImageTransform` module contains implementations of diff --git a/docs/reference/ImageWin.rst b/docs/reference/ImageWin.rst index 4151be4a7..c0b9bd2ba 100644 --- a/docs/reference/ImageWin.rst +++ b/docs/reference/ImageWin.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.ImageWin .. py:currentmodule:: PIL.ImageWin -:py:mod:`~PIL.ImageWin` Module (Windows-only) +:py:mod:`~PIL.ImageWin` module (Windows-only) ============================================= The :py:mod:`~PIL.ImageWin` module contains support to create and display images on diff --git a/docs/reference/JpegPresets.rst b/docs/reference/JpegPresets.rst index aafae44cf..b0a3ba8b5 100644 --- a/docs/reference/JpegPresets.rst +++ b/docs/reference/JpegPresets.rst @@ -1,6 +1,6 @@ .. py:currentmodule:: PIL.JpegPresets -:py:mod:`~PIL.JpegPresets` Module +:py:mod:`~PIL.JpegPresets` module ================================= .. automodule:: PIL.JpegPresets diff --git a/docs/reference/PSDraw.rst b/docs/reference/PSDraw.rst index 3e8512e7a..9eed775fc 100644 --- a/docs/reference/PSDraw.rst +++ b/docs/reference/PSDraw.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.PSDraw .. py:currentmodule:: PIL.PSDraw -:py:mod:`~PIL.PSDraw` Module +:py:mod:`~PIL.PSDraw` module ============================ The :py:mod:`~PIL.PSDraw` module provides simple print support for PostScript diff --git a/docs/reference/PixelAccess.rst b/docs/reference/PixelAccess.rst index 1ac3d034b..9d7cf83b6 100644 --- a/docs/reference/PixelAccess.rst +++ b/docs/reference/PixelAccess.rst @@ -1,6 +1,6 @@ .. _PixelAccess: -:py:class:`PixelAccess` Class +:py:class:`PixelAccess` class ============================= The PixelAccess class provides read and write access to @@ -40,7 +40,7 @@ Access using negative indexes is also possible. :: -:py:class:`PixelAccess` Class +:py:class:`PixelAccess` class ----------------------------- .. class:: PixelAccess diff --git a/docs/reference/TiffTags.rst b/docs/reference/TiffTags.rst index 7cb7d16ae..d75a48478 100644 --- a/docs/reference/TiffTags.rst +++ b/docs/reference/TiffTags.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.TiffTags .. py:currentmodule:: PIL.TiffTags -:py:mod:`~PIL.TiffTags` Module +:py:mod:`~PIL.TiffTags` module ============================== The :py:mod:`~PIL.TiffTags` module exposes many of the standard TIFF diff --git a/docs/reference/arrow_support.rst b/docs/reference/arrow_support.rst index 4a5c45e86..063046d8c 100644 --- a/docs/reference/arrow_support.rst +++ b/docs/reference/arrow_support.rst @@ -1,7 +1,7 @@ .. _arrow-support: ============= -Arrow Support +Arrow support ============= `Arrow `__ @@ -18,7 +18,7 @@ with any Arrow provider or consumer in the Python ecosystem. full-copy memory cost to reading an Arrow image. -Data Formats +Data formats ============ Pillow currently supports exporting Arrow images in all modes @@ -43,7 +43,7 @@ interpreted using the mode-specific interpretation of the bytes. The image mode must match the Arrow band format when reading single channel images. -Memory Allocator +Memory allocator ================ Pillow's default memory allocator, the :ref:`block_allocator`, @@ -59,7 +59,7 @@ To enable the single block allocator:: Note that this is a global setting, not a per-image setting. -Unsupported Features +Unsupported features ==================== * Table/dataframe protocol. We support a single array. @@ -71,7 +71,7 @@ Unsupported Features parameter. * Array metadata. -Internal Details +Internal details ================ Python Arrow C interface: diff --git a/docs/reference/block_allocator.rst b/docs/reference/block_allocator.rst index c6be5b7e6..5ad9d9fd1 100644 --- a/docs/reference/block_allocator.rst +++ b/docs/reference/block_allocator.rst @@ -1,10 +1,10 @@ .. _block_allocator: -Block Allocator +Block allocator =============== -Previous Design +Previous design --------------- Historically there have been two image allocators in Pillow: @@ -16,7 +16,7 @@ large images and makes one allocation for each scan line of size between one allocation and potentially thousands of small allocations, leading to unpredictable performance penalties around the transition. -New Design +New design ---------- ``ImagingAllocateArray`` now allocates space for images as a chain of @@ -28,7 +28,7 @@ line. This is now the default for all internal allocations. specifically requesting a single segment of memory for sharing with other code. -Memory Pools +Memory pools ------------ There is now a memory pool to contain a supply of recently freed diff --git a/docs/reference/c_extension_debugging.rst b/docs/reference/c_extension_debugging.rst index 5e8586905..12dca6cf2 100644 --- a/docs/reference/c_extension_debugging.rst +++ b/docs/reference/c_extension_debugging.rst @@ -1,5 +1,5 @@ -C Extension debugging on Linux, with gbd/valgrind. -================================================== +C extension debugging on Linux, with GBD/Valgrind +================================================= Install the tools ----------------- @@ -17,7 +17,7 @@ Then ``sudo apt-get install libtiff5-dbgsym`` - There's a bug with the ``python3-dbg`` package for at least Python 3.8 on Ubuntu 20.04, and you need to add a new link or two to make it autoload when - running python: + running Python: :: @@ -49,7 +49,7 @@ Then ``sudo apt-get install libtiff5-dbgsym`` source ~/vpy38-dbg/bin/activate cd ~/Pillow && make install -Test Case +Test case --------- Take your test image, and make a really simple harness. diff --git a/docs/reference/features.rst b/docs/reference/features.rst index c5d89b838..381d7830a 100644 --- a/docs/reference/features.rst +++ b/docs/reference/features.rst @@ -1,7 +1,7 @@ .. py:module:: PIL.features .. py:currentmodule:: PIL.features -:py:mod:`~PIL.features` Module +:py:mod:`~PIL.features` module ============================== The :py:mod:`PIL.features` module can be used to detect which Pillow features are available on your system. diff --git a/docs/reference/internal_design.rst b/docs/reference/internal_design.rst index 041177953..6bba673b9 100644 --- a/docs/reference/internal_design.rst +++ b/docs/reference/internal_design.rst @@ -1,4 +1,4 @@ -Internal Reference +Internal reference ================== .. toctree:: diff --git a/docs/reference/internal_modules.rst b/docs/reference/internal_modules.rst index 93fd82cf9..19f78864d 100644 --- a/docs/reference/internal_modules.rst +++ b/docs/reference/internal_modules.rst @@ -1,7 +1,7 @@ -Internal Modules +Internal modules ================ -:mod:`~PIL._binary` Module +:mod:`~PIL._binary` module -------------------------- .. automodule:: PIL._binary @@ -9,7 +9,7 @@ Internal Modules :undoc-members: :show-inheritance: -:mod:`~PIL._deprecate` Module +:mod:`~PIL._deprecate` module ----------------------------- .. automodule:: PIL._deprecate @@ -17,7 +17,7 @@ Internal Modules :undoc-members: :show-inheritance: -:mod:`~PIL._tkinter_finder` Module +:mod:`~PIL._tkinter_finder` module ---------------------------------- .. automodule:: PIL._tkinter_finder @@ -25,7 +25,7 @@ Internal Modules :undoc-members: :show-inheritance: -:mod:`~PIL._typing` Module +:mod:`~PIL._typing` module -------------------------- .. module:: PIL._typing @@ -58,7 +58,7 @@ on some Python versions. See :py:obj:`typing.TypeGuard`. -:mod:`~PIL._util` Module +:mod:`~PIL._util` module ------------------------ .. automodule:: PIL._util @@ -66,7 +66,7 @@ on some Python versions. :undoc-members: :show-inheritance: -:mod:`~PIL._version` Module +:mod:`~PIL._version` module --------------------------- .. module:: PIL._version @@ -78,7 +78,7 @@ on some Python versions. This is the master version number for Pillow, all other uses reference this module. -:mod:`PIL.Image.core` Module +:mod:`PIL.Image.core` module ---------------------------- .. module:: PIL._imaging diff --git a/docs/reference/limits.rst b/docs/reference/limits.rst index a71b514b5..d2f8f7d1f 100644 --- a/docs/reference/limits.rst +++ b/docs/reference/limits.rst @@ -4,7 +4,7 @@ Limits This page is documentation to the various fundamental size limits in the Pillow implementation. -Internal Limits +Internal limits =============== * Image sizes cannot be negative. These are checked both in @@ -25,10 +25,10 @@ Internal Limits is smaller than 2GB, as calculated by ``y*stride`` (so 2Gpx for 'L' images, and .5Gpx for 'RGB' -Format Size Limits +Format size limits ================== * ICO: Max size is 256x256 -* Webp: 16383x16383 (underlying library size limit: +* WebP: 16383x16383 (underlying library size limit: https://developers.google.com/speed/webp/docs/api) diff --git a/docs/reference/open_files.rst b/docs/reference/open_files.rst index 730c8da5b..0d43cbc73 100644 --- a/docs/reference/open_files.rst +++ b/docs/reference/open_files.rst @@ -1,6 +1,6 @@ .. _file-handling: -File Handling in Pillow +File handling in Pillow ======================= When opening a file as an image, Pillow requires a filename, ``os.PathLike`` @@ -36,7 +36,7 @@ have multiple frames. Pillow cannot in general close and reopen a file, so any access to that file needs to be prior to the close. -Image Lifecycle +Image lifecycle --------------- * ``Image.open()`` Filenames and ``Path`` objects are opened as a file. @@ -97,7 +97,7 @@ Complications im6.load() # FAILS, closed file -Proposed File Handling +Proposed file handling ---------------------- * ``Image.Image.load()`` should close the image file, unless there are diff --git a/docs/reference/plugins.rst b/docs/reference/plugins.rst index c789f5757..243d4f353 100644 --- a/docs/reference/plugins.rst +++ b/docs/reference/plugins.rst @@ -1,7 +1,7 @@ Plugin reference ================ -:mod:`~PIL.AvifImagePlugin` Module +:mod:`~PIL.AvifImagePlugin` module ---------------------------------- .. automodule:: PIL.AvifImagePlugin @@ -9,7 +9,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.BmpImagePlugin` Module +:mod:`~PIL.BmpImagePlugin` module --------------------------------- .. automodule:: PIL.BmpImagePlugin @@ -17,7 +17,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.BufrStubImagePlugin` Module +:mod:`~PIL.BufrStubImagePlugin` module -------------------------------------- .. automodule:: PIL.BufrStubImagePlugin @@ -25,7 +25,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.CurImagePlugin` Module +:mod:`~PIL.CurImagePlugin` module --------------------------------- .. automodule:: PIL.CurImagePlugin @@ -33,7 +33,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.DcxImagePlugin` Module +:mod:`~PIL.DcxImagePlugin` module --------------------------------- .. automodule:: PIL.DcxImagePlugin @@ -41,7 +41,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.DdsImagePlugin` Module +:mod:`~PIL.DdsImagePlugin` module --------------------------------- .. automodule:: PIL.DdsImagePlugin @@ -49,7 +49,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.EpsImagePlugin` Module +:mod:`~PIL.EpsImagePlugin` module --------------------------------- .. automodule:: PIL.EpsImagePlugin @@ -57,15 +57,15 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.FitsImagePlugin` Module --------------------------------------- +:mod:`~PIL.FitsImagePlugin` module +---------------------------------- .. automodule:: PIL.FitsImagePlugin :members: :undoc-members: :show-inheritance: -:mod:`~PIL.FliImagePlugin` Module +:mod:`~PIL.FliImagePlugin` module --------------------------------- .. automodule:: PIL.FliImagePlugin @@ -73,7 +73,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.FpxImagePlugin` Module +:mod:`~PIL.FpxImagePlugin` module --------------------------------- .. automodule:: PIL.FpxImagePlugin @@ -81,7 +81,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.GbrImagePlugin` Module +:mod:`~PIL.GbrImagePlugin` module --------------------------------- .. automodule:: PIL.GbrImagePlugin @@ -89,7 +89,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.GifImagePlugin` Module +:mod:`~PIL.GifImagePlugin` module --------------------------------- .. automodule:: PIL.GifImagePlugin @@ -97,7 +97,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.GribStubImagePlugin` Module +:mod:`~PIL.GribStubImagePlugin` module -------------------------------------- .. automodule:: PIL.GribStubImagePlugin @@ -105,7 +105,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.Hdf5StubImagePlugin` Module +:mod:`~PIL.Hdf5StubImagePlugin` module -------------------------------------- .. automodule:: PIL.Hdf5StubImagePlugin @@ -113,7 +113,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.IcnsImagePlugin` Module +:mod:`~PIL.IcnsImagePlugin` module ---------------------------------- .. automodule:: PIL.IcnsImagePlugin @@ -121,7 +121,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.IcoImagePlugin` Module +:mod:`~PIL.IcoImagePlugin` module --------------------------------- .. automodule:: PIL.IcoImagePlugin @@ -129,7 +129,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.ImImagePlugin` Module +:mod:`~PIL.ImImagePlugin` module -------------------------------- .. automodule:: PIL.ImImagePlugin @@ -137,7 +137,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.ImtImagePlugin` Module +:mod:`~PIL.ImtImagePlugin` module --------------------------------- .. automodule:: PIL.ImtImagePlugin @@ -145,7 +145,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.IptcImagePlugin` Module +:mod:`~PIL.IptcImagePlugin` module ---------------------------------- .. automodule:: PIL.IptcImagePlugin @@ -153,7 +153,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.JpegImagePlugin` Module +:mod:`~PIL.JpegImagePlugin` module ---------------------------------- .. automodule:: PIL.JpegImagePlugin @@ -161,7 +161,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.Jpeg2KImagePlugin` Module +:mod:`~PIL.Jpeg2KImagePlugin` module ------------------------------------ .. automodule:: PIL.Jpeg2KImagePlugin @@ -169,7 +169,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.McIdasImagePlugin` Module +:mod:`~PIL.McIdasImagePlugin` module ------------------------------------ .. automodule:: PIL.McIdasImagePlugin @@ -177,7 +177,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.MicImagePlugin` Module +:mod:`~PIL.MicImagePlugin` module --------------------------------- .. automodule:: PIL.MicImagePlugin @@ -185,7 +185,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.MpegImagePlugin` Module +:mod:`~PIL.MpegImagePlugin` module ---------------------------------- .. automodule:: PIL.MpegImagePlugin @@ -193,15 +193,15 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.MpoImagePlugin` Module ----------------------------------- +:mod:`~PIL.MpoImagePlugin` module +--------------------------------- .. automodule:: PIL.MpoImagePlugin :members: :undoc-members: :show-inheritance: -:mod:`~PIL.MspImagePlugin` Module +:mod:`~PIL.MspImagePlugin` module --------------------------------- .. automodule:: PIL.MspImagePlugin @@ -209,7 +209,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.PalmImagePlugin` Module +:mod:`~PIL.PalmImagePlugin` module ---------------------------------- .. automodule:: PIL.PalmImagePlugin @@ -217,7 +217,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.PcdImagePlugin` Module +:mod:`~PIL.PcdImagePlugin` module --------------------------------- .. automodule:: PIL.PcdImagePlugin @@ -225,7 +225,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.PcxImagePlugin` Module +:mod:`~PIL.PcxImagePlugin` module --------------------------------- .. automodule:: PIL.PcxImagePlugin @@ -233,7 +233,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.PdfImagePlugin` Module +:mod:`~PIL.PdfImagePlugin` module --------------------------------- .. automodule:: PIL.PdfImagePlugin @@ -241,7 +241,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.PixarImagePlugin` Module +:mod:`~PIL.PixarImagePlugin` module ----------------------------------- .. automodule:: PIL.PixarImagePlugin @@ -249,7 +249,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.PngImagePlugin` Module +:mod:`~PIL.PngImagePlugin` module --------------------------------- .. automodule:: PIL.PngImagePlugin @@ -260,7 +260,7 @@ Plugin reference :member-order: groupwise -:mod:`~PIL.PpmImagePlugin` Module +:mod:`~PIL.PpmImagePlugin` module --------------------------------- .. automodule:: PIL.PpmImagePlugin @@ -268,7 +268,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.PsdImagePlugin` Module +:mod:`~PIL.PsdImagePlugin` module --------------------------------- .. automodule:: PIL.PsdImagePlugin @@ -276,7 +276,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.SgiImagePlugin` Module +:mod:`~PIL.SgiImagePlugin` module --------------------------------- .. automodule:: PIL.SgiImagePlugin @@ -284,7 +284,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.SpiderImagePlugin` Module +:mod:`~PIL.SpiderImagePlugin` module ------------------------------------ .. automodule:: PIL.SpiderImagePlugin @@ -292,7 +292,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.SunImagePlugin` Module +:mod:`~PIL.SunImagePlugin` module --------------------------------- .. automodule:: PIL.SunImagePlugin @@ -300,7 +300,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.TgaImagePlugin` Module +:mod:`~PIL.TgaImagePlugin` module --------------------------------- .. automodule:: PIL.TgaImagePlugin @@ -308,7 +308,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.TiffImagePlugin` Module +:mod:`~PIL.TiffImagePlugin` module ---------------------------------- .. automodule:: PIL.TiffImagePlugin @@ -316,7 +316,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.WebPImagePlugin` Module +:mod:`~PIL.WebPImagePlugin` module ---------------------------------- .. automodule:: PIL.WebPImagePlugin @@ -324,7 +324,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.WmfImagePlugin` Module +:mod:`~PIL.WmfImagePlugin` module --------------------------------- .. automodule:: PIL.WmfImagePlugin @@ -332,7 +332,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.XVThumbImagePlugin` Module +:mod:`~PIL.XVThumbImagePlugin` module ------------------------------------- .. automodule:: PIL.XVThumbImagePlugin @@ -340,7 +340,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.XbmImagePlugin` Module +:mod:`~PIL.XbmImagePlugin` module --------------------------------- .. automodule:: PIL.XbmImagePlugin @@ -348,7 +348,7 @@ Plugin reference :undoc-members: :show-inheritance: -:mod:`~PIL.XpmImagePlugin` Module +:mod:`~PIL.XpmImagePlugin` module --------------------------------- .. automodule:: PIL.XpmImagePlugin diff --git a/docs/releasenotes/10.0.0.rst b/docs/releasenotes/10.0.0.rst index 2ea973c5c..3e2aa84b1 100644 --- a/docs/releasenotes/10.0.0.rst +++ b/docs/releasenotes/10.0.0.rst @@ -28,7 +28,7 @@ This threshold can be changed by setting :py:data:`PIL.ImageFont.MAX_STRING_LENGTH`. It can be disabled by setting ``ImageFont.MAX_STRING_LENGTH = None``. -Backwards Incompatible Changes +Backwards incompatible changes ============================== Categories @@ -164,7 +164,7 @@ Since Pillow's C API is now faster than PyAccess on PyPy, ``Image.USE_CFFI_ACCESS``, for switching from the C API to PyAccess, is similarly deprecated. -API Changes +API changes =========== Added line width parameter to ImageDraw regular_polygon @@ -173,7 +173,7 @@ Added line width parameter to ImageDraw regular_polygon An optional line ``width`` parameter has been added to ``ImageDraw.Draw.regular_polygon``. -API Additions +API additions ============= Added ``alpha_only`` argument to ``getbbox()`` @@ -184,7 +184,7 @@ Added ``alpha_only`` argument to ``getbbox()`` and the image has an alpha channel, trim transparent pixels. Otherwise, trim pixels when all channels are zero. -Other Changes +Other changes ============= 32-bit wheels diff --git a/docs/releasenotes/10.0.1.rst b/docs/releasenotes/10.0.1.rst index 02189d514..aa17a62e0 100644 --- a/docs/releasenotes/10.0.1.rst +++ b/docs/releasenotes/10.0.1.rst @@ -11,7 +11,7 @@ This release provides an updated install script and updated wheels to include libwebp 1.3.2, preventing a potential heap buffer overflow in WebP. -Other Changes +Other changes ============= Updated tests to pass with latest zlib version diff --git a/docs/releasenotes/10.1.0.rst b/docs/releasenotes/10.1.0.rst index fd556bdf1..649c2bdf9 100644 --- a/docs/releasenotes/10.1.0.rst +++ b/docs/releasenotes/10.1.0.rst @@ -1,7 +1,7 @@ 10.1.0 ------ -API Changes +API changes =========== Setting image mode @@ -35,7 +35,7 @@ to be specified, rather than a single number for both dimensions. :: ImageFilter.BoxBlur((2, 5)) ImageFilter.GaussianBlur((2, 5)) -API Additions +API additions ============= EpsImagePlugin.gs_binary @@ -84,7 +84,7 @@ font size for this new builtin font:: draw.multiline_text((0, 0), "test", font_size=24) draw.multiline_textbbox((0, 0), "test", font_size=24) -Other Changes +Other changes ============= Python 3.12 diff --git a/docs/releasenotes/10.2.0.rst b/docs/releasenotes/10.2.0.rst index 1c6b78b08..337748785 100644 --- a/docs/releasenotes/10.2.0.rst +++ b/docs/releasenotes/10.2.0.rst @@ -53,7 +53,7 @@ The functions ``IptcImageFile.dump`` and ``IptcImageFile.i``, and the constant for internal use, so there is no replacement. They can each be replaced by a single line of code using builtin functions in Python. -API Changes +API changes =========== Zero or negative font size error @@ -63,7 +63,7 @@ When creating a :py:class:`~PIL.ImageFont.FreeTypeFont` instance, either directl through :py:func:`~PIL.ImageFont.truetype`, if the font size is zero or less, a :py:exc:`ValueError` will now be raised. -API Additions +API additions ============= Added DdsImagePlugin enums @@ -95,7 +95,7 @@ JPEG tables-only streamtype When saving JPEG files, ``streamtype`` can now be set to 1, for tables-only. This will output only the quantization and Huffman tables for the image. -Other Changes +Other changes ============= Added DDS BC4U and DX10 BC1 and BC4 reading diff --git a/docs/releasenotes/10.3.0.rst b/docs/releasenotes/10.3.0.rst index 2f0437d94..6c7d8ea0a 100644 --- a/docs/releasenotes/10.3.0.rst +++ b/docs/releasenotes/10.3.0.rst @@ -65,7 +65,7 @@ ImageMath.eval() :py:meth:`~PIL.ImageMath.unsafe_eval` instead. See earlier security notes for more information. -API Changes +API changes =========== Added alpha_quality argument when saving WebP images @@ -87,7 +87,7 @@ Negative P1-P3 PPM value error If a P1-P3 PPM image contains a negative value, a :py:exc:`ValueError` will now be raised. -API Additions +API additions ============= Added PerspectiveTransform @@ -97,7 +97,7 @@ Added PerspectiveTransform that all of the :py:data:`~PIL.Image.Transform` values now have a corresponding subclass of :py:class:`~PIL.ImageTransform.Transform`. -Other Changes +Other changes ============= Portable FloatMap (PFM) images diff --git a/docs/releasenotes/10.4.0.rst b/docs/releasenotes/10.4.0.rst index 8d3706be6..84a6091c9 100644 --- a/docs/releasenotes/10.4.0.rst +++ b/docs/releasenotes/10.4.0.rst @@ -41,7 +41,7 @@ ImageDraw.getdraw hints parameter The ``hints`` parameter in :py:meth:`~PIL.ImageDraw.getdraw()` has been deprecated. -API Additions +API additions ============= ImageDraw.circle @@ -51,7 +51,7 @@ Added :py:meth:`~PIL.ImageDraw.ImageDraw.circle`. It provides the same functiona :py:meth:`~PIL.ImageDraw.ImageDraw.ellipse`, but instead of taking a bounding box, it takes a center point and radius. -Other Changes +Other changes ============= Python 3.13 beta diff --git a/docs/releasenotes/11.0.0.rst b/docs/releasenotes/11.0.0.rst index c3f18140f..020fbf7df 100644 --- a/docs/releasenotes/11.0.0.rst +++ b/docs/releasenotes/11.0.0.rst @@ -1,7 +1,7 @@ 11.0.0 ------ -Backwards Incompatible Changes +Backwards incompatible changes ============================== Python 3.8 @@ -103,7 +103,7 @@ JpegImageFile.huffman_ac and JpegImageFile.huffman_dc The ``huffman_ac`` and ``huffman_dc`` dictionaries on JPEG images were unused. They have been deprecated, and will be removed in Pillow 12 (2025-10-15). -Specific WebP Feature Checks +Specific WebP feature checks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. deprecated:: 11.0.0 @@ -113,7 +113,7 @@ Specific WebP Feature Checks ``True`` if the WebP module is installed, until they are removed in Pillow 12.0.0 (2025-10-15). -API Changes +API changes =========== Default resampling filter for I;16* image modes @@ -122,7 +122,7 @@ Default resampling filter for I;16* image modes The default resampling filter for I;16, I;16L, I;16B and I;16N has been changed from ``Image.NEAREST`` to ``Image.BICUBIC``, to match the majority of modes. -API Additions +API additions ============= Writing XMP bytes to JPEG and MPO @@ -138,7 +138,7 @@ either JPEG or MPO images:: im.info["xmp"] = b"test" im.save("out.jpg") -Other Changes +Other changes ============= Python 3.13 @@ -154,7 +154,7 @@ Support has also been added for the experimental free-threaded mode of :pep:`703 Python 3.13 only supports macOS versions 10.13 and later. -C-level Flags +C-level flags ^^^^^^^^^^^^^ Some compiling flags like ``WITH_THREADING``, ``WITH_IMAGECHOPS``, and other diff --git a/docs/releasenotes/11.1.0.rst b/docs/releasenotes/11.1.0.rst index 0d56cb420..4888ddf56 100644 --- a/docs/releasenotes/11.1.0.rst +++ b/docs/releasenotes/11.1.0.rst @@ -10,7 +10,7 @@ ExifTags.IFD.Makernote ``ExifTags.IFD.Makernote`` has been deprecated. Instead, use ``ExifTags.IFD.MakerNote``. -API Changes +API changes =========== Writing XMP bytes to JPEG and MPO @@ -34,7 +34,7 @@ be used:: second_im.encoderinfo = {"xmp": b"test"} im.save("out.mpo", save_all=True, append_images=[second_im]) -API Additions +API additions ============= Check for zlib-ng @@ -54,7 +54,7 @@ TIFF images can now be saved as BigTIFF using a ``big_tiff`` argument:: im.save("out.tiff", big_tiff=True) -Other Changes +Other changes ============= Reading JPEG 2000 comments diff --git a/docs/releasenotes/11.2.1.rst b/docs/releasenotes/11.2.1.rst index 5c6d40d9d..f55b0d7d7 100644 --- a/docs/releasenotes/11.2.1.rst +++ b/docs/releasenotes/11.2.1.rst @@ -32,7 +32,7 @@ Image.Image.get_child_images() method uses an image's file pointer, and so child images could only be retrieved from an :py:class:`PIL.ImageFile.ImageFile` instance. -API Changes +API changes =========== ``append_images`` no longer requires ``save_all`` @@ -44,7 +44,7 @@ supports saving multiple frames:: im.save("out.gif", append_images=ims) -API Additions +API additions ============= ``"justify"`` multiline text alignment @@ -86,7 +86,7 @@ DXT5, BC2, BC3 and BC5 are supported:: im.save("out.dds", pixel_format="DXT1") -Other Changes +Other changes ============= Arrow support diff --git a/docs/releasenotes/2.7.0.rst b/docs/releasenotes/2.7.0.rst index e9b0995bb..a1ddd1178 100644 --- a/docs/releasenotes/2.7.0.rst +++ b/docs/releasenotes/2.7.0.rst @@ -1,13 +1,13 @@ 2.7.0 ----- -Sane Plugin +Sane plugin ^^^^^^^^^^^ The Sane plugin has now been split into its own repo: https://github.com/python-pillow/Sane . -Png text chunk size limits +PNG text chunk size limits ^^^^^^^^^^^^^^^^^^^^^^^^^^ To prevent potential denial of service attacks using compressed text @@ -155,7 +155,7 @@ so the quality was worse compared to other Gaussian blur software. The new implementation does not have this drawback. -TIFF Parameter Changes +TIFF parameter changes ^^^^^^^^^^^^^^^^^^^^^^ Several kwarg parameters for saving TIFF images were previously diff --git a/docs/releasenotes/3.0.0.rst b/docs/releasenotes/3.0.0.rst index 8bc477f70..dcd8031f5 100644 --- a/docs/releasenotes/3.0.0.rst +++ b/docs/releasenotes/3.0.0.rst @@ -1,7 +1,7 @@ 3.0.0 ----- -Backwards Incompatible Changes +Backwards incompatible changes ============================== Several methods that have been marked as deprecated for many releases @@ -18,10 +18,10 @@ have been removed in this release: * ``ImageWin.fromstring()`` * ``ImageWin.tostring()`` -Other Changes +Other changes ============= -Saving Multipage Images +Saving multipage images ^^^^^^^^^^^^^^^^^^^^^^^ There is now support for saving multipage images in the ``GIF`` and @@ -30,10 +30,10 @@ as a keyword argument to the save:: im.save('test.pdf', save_all=True) -Tiff ImageFileDirectory Rewrite +TIFF ImageFileDirectory rewrite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The Tiff ImageFileDirectory metadata code has been rewritten. Where +The TIFF ImageFileDirectory metadata code has been rewritten. Where previously it returned a somewhat arbitrary set of values and tuples, it now returns bare values where appropriate and tuples when the metadata item is a sequence or collection. @@ -41,7 +41,7 @@ metadata item is a sequence or collection. The original metadata is still available in the TiffImage.tags, the new values are available in the TiffImage.tags_v2 member. The old structures will be deprecated at some point in the future. When -saving Tiff metadata, new code should use the +saving TIFF metadata, new code should use the TiffImagePlugin.ImageFileDirectory_v2 class. LibJpeg and Zlib are required by default diff --git a/docs/releasenotes/3.1.0.rst b/docs/releasenotes/3.1.0.rst index 951819f19..90f77ff61 100644 --- a/docs/releasenotes/3.1.0.rst +++ b/docs/releasenotes/3.1.0.rst @@ -22,7 +22,7 @@ not the absolute height of each line. There is also now a default spacing of 4px between lines. -Exif, Jpeg and Tiff Metadata +EXIF, JPEG and TIFF metadata ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There were major changes in the TIFF ImageFileDirectory support in @@ -63,7 +63,7 @@ single item tuples have been unwrapped and return a bare element. The format returned by Pillow 3.0 has been abandoned. A more fully featured interface for EXIF is anticipated in a future release. -Out of Spec Metadata +Out of spec metadata ++++++++++++++++++++ In Pillow 3.0 and 3.1, images that contain metadata that is internally diff --git a/docs/releasenotes/3.2.0.rst b/docs/releasenotes/3.2.0.rst index 3ed8fae57..20d7d073e 100644 --- a/docs/releasenotes/3.2.0.rst +++ b/docs/releasenotes/3.2.0.rst @@ -1,7 +1,7 @@ 3.2.0 ----- -New DDS and FTEX Image Plugins +New DDS and FTEX image plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The ``DdsImagePlugin`` reading DXT1 and DXT5 encoded ``.dds`` images was @@ -18,7 +18,7 @@ Updates to the GbrImagePlugin The ``GbrImagePlugin`` (GIMP brush format) has been updated to fix support for version 1 files and add support for version 2 files. -Passthrough Parameters for ImageDraw.text +Passthrough parameters for ImageDraw.text ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``ImageDraw.multiline_text`` and ``ImageDraw.multiline_size`` take extra diff --git a/docs/releasenotes/3.3.0.rst b/docs/releasenotes/3.3.0.rst index cd6f7e2f9..9447245c4 100644 --- a/docs/releasenotes/3.3.0.rst +++ b/docs/releasenotes/3.3.0.rst @@ -11,7 +11,7 @@ libimagequant. We cannot distribute binaries due to licensing differences. -New Setup.py options +New setup.py options ^^^^^^^^^^^^^^^^^^^^ There are two new options to control the ``build_ext`` task in ``setup.py``: @@ -43,7 +43,7 @@ This greatly improves both quality and performance in this case. Also, the bug with wrong image size calculation when rotating by 90 degrees was fixed. -Image Metadata +Image metadata ^^^^^^^^^^^^^^ The return type for binary data in version 2 Exif and Tiff metadata diff --git a/docs/releasenotes/3.3.2.rst b/docs/releasenotes/3.3.2.rst index 73156a65d..60ffbdcba 100644 --- a/docs/releasenotes/3.3.2.rst +++ b/docs/releasenotes/3.3.2.rst @@ -4,7 +4,7 @@ Security ======== -Integer overflow in Map.c +Integer overflow in map.c ^^^^^^^^^^^^^^^^^^^^^^^^^ Pillow prior to 3.3.2 may experience integer overflow errors in map.c @@ -27,7 +27,7 @@ memory without duplicating the image first. This issue was found by Cris Neckar at Divergent Security. -Sign Extension in Storage.c +Sign extension in Storage.c ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pillow prior to 3.3.2 and PIL 1.1.7 (at least) do not check for diff --git a/docs/releasenotes/3.4.0.rst b/docs/releasenotes/3.4.0.rst index 8a5a7efe3..01ec77a58 100644 --- a/docs/releasenotes/3.4.0.rst +++ b/docs/releasenotes/3.4.0.rst @@ -1,7 +1,7 @@ 3.4.0 ----- -Backwards Incompatible Changes +Backwards incompatible changes ============================== Image.core.open_ppm removed @@ -14,7 +14,7 @@ been removed. If you were using this function, please use Deprecations ============ -Deprecation Warning when Saving JPEGs +Deprecation warning when saving JPEGs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ JPEG images cannot contain an alpha channel. Pillow prior to 3.4.0 @@ -22,7 +22,7 @@ silently drops the alpha channel. With this release Pillow will now issue a :py:exc:`DeprecationWarning` when attempting to save a ``RGBA`` mode image as a JPEG. This will become an error in Pillow 4.2. -API Additions +API additions ============= New resizing filters @@ -37,7 +37,7 @@ two times shorter window than ``BILINEAR``. It can be used for image reduction providing the image downscaling quality comparable to ``BICUBIC``. Both new filters don't show good quality for the image upscaling. -New DDS Decoders +New DDS decoders ^^^^^^^^^^^^^^^^ Pillow can now decode DXT3 images, as well as the previously supported diff --git a/docs/releasenotes/4.0.0.rst b/docs/releasenotes/4.0.0.rst index 625f237e8..dd97463f6 100644 --- a/docs/releasenotes/4.0.0.rst +++ b/docs/releasenotes/4.0.0.rst @@ -1,7 +1,7 @@ 4.0.0 ----- -Python 2.6 and 3.2 Dropped +Python 2.6 and 3.2 dropped ^^^^^^^^^^^^^^^^^^^^^^^^^^ Pillow 4.0 no longer supports Python 2.6 and 3.2. We will not be diff --git a/docs/releasenotes/4.1.0.rst b/docs/releasenotes/4.1.0.rst index 80ad9b9fb..1f809ad18 100644 --- a/docs/releasenotes/4.1.0.rst +++ b/docs/releasenotes/4.1.0.rst @@ -15,10 +15,10 @@ Several deprecated items have been removed. ``PIL.ImageDraw.ImageDraw.setfont`` have been removed. -Other Changes +Other changes ============= -Closing Files When Opening Images +Closing files when opening images ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The file handling when opening images has been overhauled. Previously, @@ -41,7 +41,7 @@ is specified: the underlying file until we are done with the image. The mapping will be closed in the ``close`` or ``__del__`` method. -Changes to GIF Handling When Saving +Changes to GIF handling when saving ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The :py:class:`PIL.GifImagePlugin` code has been refactored to fix the flow when @@ -57,14 +57,14 @@ saving images. There are two external changes that arise from this: This refactor fixed some bugs with palette handling when saving multiple frame GIFs. -New Method: Image.remap_palette +New method: Image.remap_palette ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The method :py:meth:`PIL.Image.Image.remap_palette()` has been added. This method was hoisted from the GifImagePlugin code used to optimize the palette. -Added Decoder Registry and Support for Python Based Decoders +Added decoder registry and support for Python-based decoders ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There is now a decoder registry similar to the image plugin diff --git a/docs/releasenotes/4.1.1.rst b/docs/releasenotes/4.1.1.rst index 8c8055bfa..1cbd3853b 100644 --- a/docs/releasenotes/4.1.1.rst +++ b/docs/releasenotes/4.1.1.rst @@ -1,7 +1,7 @@ 4.1.1 ----- -Fix Regression with reading DPI from EXIF data +Fix regression with reading DPI from EXIF data ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some JPEG images don't contain DPI information in the image metadata, diff --git a/docs/releasenotes/4.2.0.rst b/docs/releasenotes/4.2.0.rst index bc2a45f02..0ea3de399 100644 --- a/docs/releasenotes/4.2.0.rst +++ b/docs/releasenotes/4.2.0.rst @@ -1,7 +1,7 @@ 4.2.0 ----- -Backwards Incompatible Changes +Backwards incompatible changes ============================== Several deprecated items have been removed @@ -17,17 +17,17 @@ Several deprecated items have been removed was shown. From Pillow 4.2.0, the deprecation warning is removed and an :py:exc:`IOError` is raised. -Removed Core Image Function +Removed core Image function ^^^^^^^^^^^^^^^^^^^^^^^^^^^ The unused function ``Image.core.new_array`` was removed. This is an internal function that should not have been used by user code, but it was accessible from the python layer. -Other Changes +Other changes ============= -Added Complex Text Rendering +Added complex text rendering ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pillow now supports complex text rendering for scripts requiring glyph @@ -36,7 +36,7 @@ dependencies: harfbuzz, fribidi, and raqm. See the :doc:`install documentation <../installation>` for further details. This feature is tested and works on Unix and Mac, but has not yet been built on Windows platforms. -New Optional Parameters +New optional parameters ^^^^^^^^^^^^^^^^^^^^^^^ * :py:meth:`PIL.ImageDraw.floodfill` has a new optional parameter: @@ -47,7 +47,7 @@ New Optional Parameters optional parameter for specifying additional images to create multipage outputs. -New DecompressionBomb Warning +New DecompressionBomb warning ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :py:meth:`PIL.Image.Image.crop` now may raise a DecompressionBomb diff --git a/docs/releasenotes/4.2.1.rst b/docs/releasenotes/4.2.1.rst index 2061f6467..617d51e52 100644 --- a/docs/releasenotes/4.2.1.rst +++ b/docs/releasenotes/4.2.1.rst @@ -3,7 +3,7 @@ There are no functional changes in this release. -Fixed Windows PyPy Build +Fixed Windows PyPy build ^^^^^^^^^^^^^^^^^^^^^^^^ A change in the 4.2.0 cycle broke the Windows PyPy build. This has diff --git a/docs/releasenotes/4.3.0.rst b/docs/releasenotes/4.3.0.rst index ea81fc45e..87a57799f 100644 --- a/docs/releasenotes/4.3.0.rst +++ b/docs/releasenotes/4.3.0.rst @@ -1,7 +1,7 @@ 4.3.0 ----- -API Changes +API changes =========== Deprecations @@ -12,7 +12,7 @@ Several undocumented functions in ImageOps have been deprecated: ``box_blur``. Use the equivalent operations in ``ImageFilter`` instead. These functions will be removed in a future release. -TIFF Metadata Changes +TIFF metadata changes ^^^^^^^^^^^^^^^^^^^^^ * TIFF tags with unknown type/quantity now default to being bare @@ -27,7 +27,7 @@ TIFF Metadata Changes items, as there can be multiple items, one for UTF-8, and one for UTF-16. -Core Image API Changes +Core Image API changes ^^^^^^^^^^^^^^^^^^^^^^ These are internal functions that should not have been used by user @@ -44,10 +44,10 @@ The ``PIL.Image.core.getcount`` methods have been removed, use ``PIL.Image.core.get_stats()['new_count']`` property instead. -API Additions +API additions ============= -Get One Channel From Image +Get one channel from image ^^^^^^^^^^^^^^^^^^^^^^^^^^ A new method :py:meth:`PIL.Image.Image.getchannel` has been added to @@ -56,14 +56,14 @@ return a single channel by index or name. For example, ``getchannel`` should work up to 6 times faster than ``image.split()[0]`` in previous Pillow versions. -Box Blur +Box blur ^^^^^^^^ A new filter, :py:class:`PIL.ImageFilter.BoxBlur`, has been added. This is a filter with similar results to a Gaussian blur, but is much faster. -Partial Resampling +Partial resampling ^^^^^^^^^^^^^^^^^^ Added new argument ``box`` for :py:meth:`PIL.Image.Image.resize`. This @@ -71,14 +71,14 @@ argument defines a source rectangle from within the source image to be resized. This is very similar to the ``image.crop(box).resize(size)`` sequence except that ``box`` can be specified with subpixel accuracy. -New Transpose Operation +New transpose operation ^^^^^^^^^^^^^^^^^^^^^^^ The ``Image.TRANSVERSE`` operation has been added to :py:meth:`PIL.Image.Image.transpose`. This is equivalent to a transpose operation about the opposite diagonal. -Multiband Filters +Multiband filters ^^^^^^^^^^^^^^^^^ There is a new :py:class:`PIL.ImageFilter.MultibandFilter` base class @@ -87,10 +87,10 @@ operation. The original :py:class:`PIL.ImageFilter.Filter` class remains for image filters that can process only single band images, or require splitting of channels prior to filtering. -Other Changes +Other changes ============= -Loading 16-bit TIFF Images +Loading 16-bit TIFF images ^^^^^^^^^^^^^^^^^^^^^^^^^^ Pillow now can read 16-bit multichannel TIFF files including files @@ -101,7 +101,7 @@ Pillow now can read 16-bit signed integer single channel TIFF files. The image data is promoted to 32-bit for storage and processing. -SGI Images +SGI images ^^^^^^^^^^ Pillow can now read and write uncompressed 16-bit multichannel SGI @@ -129,7 +129,7 @@ This release contains several performance improvements: falling back to an allocation for each scan line for images larger than the block size. -CMYK Conversion +CMYK conversion ^^^^^^^^^^^^^^^ The basic CMYK->RGB conversion has been tweaked to match the formula diff --git a/docs/releasenotes/5.0.0.rst b/docs/releasenotes/5.0.0.rst index be00a45cd..2b93e0322 100644 --- a/docs/releasenotes/5.0.0.rst +++ b/docs/releasenotes/5.0.0.rst @@ -1,10 +1,10 @@ 5.0.0 ----- -Backwards Incompatible Changes +Backwards incompatible changes ============================== -Python 3.3 Dropped +Python 3.3 dropped ^^^^^^^^^^^^^^^^^^ Python 3.3 is EOL and no longer supported due to moving testing from nose, @@ -12,7 +12,7 @@ which is deprecated, to pytest, which doesn't support Python 3.3. We will not be creating binaries, testing, or retaining compatibility with this version. The final version of Pillow for Python 3.3 is 4.3.0. -Decompression Bombs now raise Exceptions +Decompression bombs now raise exceptions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pillow has previously emitted warnings for images that are @@ -31,7 +31,7 @@ separate package, pillow-scripts, living at https://github.com/python-pillow/pillow-scripts. -API Changes +API changes =========== OleFileIO.py @@ -54,7 +54,7 @@ Several image plugins supported a named ``check`` parameter on their nominally private ``_save`` method to preflight if the image could be saved in that format. That parameter has been removed. -API Additions +API additions ============= Image.transform @@ -65,16 +65,16 @@ A new named parameter, ``fillcolor``, has been added to the area outside the transformed area in the output image. This parameter takes the same color specifications as used in ``Image.new``. -GIF Disposal +GIF disposal ^^^^^^^^^^^^ Multiframe GIF images now take an optional disposal parameter to specify the disposal option for changed pixels. -Other Changes +Other changes ============= -Compressed TIFF Images +Compressed TIFF images ^^^^^^^^^^^^^^^^^^^^^^ Previously, there were some compression modes (JPEG, Packbits, and @@ -82,7 +82,7 @@ LZW) that were supported with Pillow's internal TIFF decoder. All compressed TIFFs are now read using the ``libtiff`` decoder, as it implements the compression schemes more correctly. -Libraqm is now Dynamically Linked +Libraqm is now dynamically linked ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The libraqm dependency for complex text scripts is now linked @@ -90,14 +90,14 @@ dynamically at runtime rather than at packaging time. This allows us to release binaries with support for libraqm if it is installed on the user's machine. -Source Layout Changes +Source layout changes ^^^^^^^^^^^^^^^^^^^^^ The Pillow source is now stored within the ``src`` directory of the distribution. This prevents accidental imports of the PIL directory when running Python from the project directory. -Setup.py Changes +Setup.py changes ^^^^^^^^^^^^^^^^ Multiarch support on Linux should be more robust, especially on Debian diff --git a/docs/releasenotes/5.1.0.rst b/docs/releasenotes/5.1.0.rst index 4e3d10ac5..4b80e8521 100644 --- a/docs/releasenotes/5.1.0.rst +++ b/docs/releasenotes/5.1.0.rst @@ -1,7 +1,7 @@ 5.1.0 ----- -API Changes +API changes =========== Optional channels for TIFF files @@ -12,22 +12,22 @@ and ``CMYK`` with up to 6 8-bit channels, discarding any extra channels if the content is tagged as UNSPECIFIED. Pillow still does not store more than 4 8-bit channels of image data. -API Additions +API additions ============= -Append to PDF Files +Append to PDF files ^^^^^^^^^^^^^^^^^^^ Images can now be appended to PDF files in place by passing in ``append=True`` when saving the image. -New BLP File Format +New BLP file format ^^^^^^^^^^^^^^^^^^^ Pillow now supports reading the BLP "Blizzard Mipmap" file format used for tiles in Blizzard's engine. -Other Changes +Other changes ============= WebP memory leak diff --git a/docs/releasenotes/5.2.0.rst b/docs/releasenotes/5.2.0.rst index d9b8f0fb7..d18337820 100644 --- a/docs/releasenotes/5.2.0.rst +++ b/docs/releasenotes/5.2.0.rst @@ -1,7 +1,7 @@ 5.2.0 ----- -API Changes +API changes =========== Deprecations @@ -17,7 +17,7 @@ Pillow 6.0.0, and ``PILLOW_VERSION`` will be removed after that. Use ``PIL.__version__`` instead. -API Additions +API additions ============= 3D color lookup tables @@ -75,7 +75,7 @@ TGA file format Pillow can now read and write LA data (in addition to L, P, RGB and RGBA), and write RLE data (in addition to uncompressed). -Other Changes +Other changes ============= Support added for Python 3.7 diff --git a/docs/releasenotes/5.3.0.rst b/docs/releasenotes/5.3.0.rst index 8f276da24..6adce95b2 100644 --- a/docs/releasenotes/5.3.0.rst +++ b/docs/releasenotes/5.3.0.rst @@ -1,7 +1,7 @@ 5.3.0 ----- -API Changes +API changes =========== Image size @@ -20,7 +20,7 @@ The exceptions to this are: as direct image size setting was previously necessary to work around an issue with tile extents. -API Additions +API additions ============= Added line width parameter to rectangle and ellipse-based shapes @@ -59,7 +59,7 @@ and size, new method ``ImageOps.pad`` pads images to fill a requested aspect ratio and size, filling new space with a provided ``color`` and positioning the image within the new area through a ``centering`` argument. -Other Changes +Other changes ============= Added support for reading tiled TIFF images through LibTIFF. Compressed TIFF diff --git a/docs/releasenotes/5.4.0.rst b/docs/releasenotes/5.4.0.rst index 6d7277c70..13b540d60 100644 --- a/docs/releasenotes/5.4.0.rst +++ b/docs/releasenotes/5.4.0.rst @@ -1,7 +1,7 @@ 5.4.0 ----- -API Changes +API changes =========== APNG extension to PNG plugin @@ -55,7 +55,7 @@ TIFF images can now be saved with custom integer, float and string TIFF tags:: print(im2.tag_v2[37002]) # "custom tag value" print(im2.tag_v2[37004]) # b"custom tag value" -Other Changes +Other changes ============= ImageOps.fit diff --git a/docs/releasenotes/6.0.0.rst b/docs/releasenotes/6.0.0.rst index 5e69f0b6b..b788b2eeb 100644 --- a/docs/releasenotes/6.0.0.rst +++ b/docs/releasenotes/6.0.0.rst @@ -1,7 +1,7 @@ 6.0.0 ----- -Backwards Incompatible Changes +Backwards incompatible changes ============================== Python 3.4 dropped @@ -32,7 +32,7 @@ Removed deprecated VERSION ``VERSION`` (the old PIL version, always 1.1.7) has been removed. Use ``__version__`` instead. -API Changes +API changes =========== Deprecations @@ -137,7 +137,7 @@ loaded, ``Image.MIME["PPM"]`` will now return the generic "image/x-portable-anym The TGA, PCX and ICO formats also now have MIME types: "image/x-tga", "image/x-pcx" and "image/x-icon" respectively. -API Additions +API additions ============= DIB file format @@ -186,7 +186,7 @@ EXIF data can now be read from and saved to PNG images. However, unlike other im formats, EXIF data is not guaranteed to be present in :py:attr:`~PIL.Image.Image.info` until :py:meth:`~PIL.Image.Image.load` has been called. -Other Changes +Other changes ============= Reading new DDS image format diff --git a/docs/releasenotes/6.1.0.rst b/docs/releasenotes/6.1.0.rst index ce3edc5fa..761f435f3 100644 --- a/docs/releasenotes/6.1.0.rst +++ b/docs/releasenotes/6.1.0.rst @@ -23,7 +23,7 @@ Use instead:: with Image.open("hopper.png") as im: im.save("out.jpg") -API Additions +API additions ============= Image.entropy @@ -61,7 +61,7 @@ file. ``ImageFont.FreeTypeFont`` has four new methods, instead. An :py:exc:`IOError` will be raised if the font is not a variation font. FreeType 2.9.1 or greater is required. -Other Changes +Other changes ============= ImageTk.getimage diff --git a/docs/releasenotes/6.2.0.rst b/docs/releasenotes/6.2.0.rst index b851c56fc..b37cd7160 100644 --- a/docs/releasenotes/6.2.0.rst +++ b/docs/releasenotes/6.2.0.rst @@ -29,7 +29,7 @@ perform operations on it. The CVE is regarding DOS problems, such as consuming large amounts of memory, or taking a large amount of time to process an image. -API Changes +API changes =========== Image.getexif @@ -48,7 +48,7 @@ There has been a longstanding warning that the defaults of ``Image.frombuffer`` may change in the future for the "raw" decoder. The change will now take place in Pillow 7.0. -API Additions +API additions ============= Text stroking @@ -93,7 +93,7 @@ ImageGrab on multi-monitor Windows An ``all_screens`` argument has been added to ``ImageGrab.grab``. If ``True``, all monitors will be included in the created image. -Other Changes +Other changes ============= Removed bdist_wininst .exe installers diff --git a/docs/releasenotes/6.2.1.rst b/docs/releasenotes/6.2.1.rst index 372298fbc..0ede05917 100644 --- a/docs/releasenotes/6.2.1.rst +++ b/docs/releasenotes/6.2.1.rst @@ -1,7 +1,7 @@ 6.2.1 ----- -API Changes +API changes =========== Deprecations @@ -15,7 +15,7 @@ Python 2.7 reaches end-of-life on 2020-01-01. Pillow 7.0.0 will be released on 2020-01-01 and will drop support for Python 2.7, making Pillow 6.2.x the last release series to support Python 2. -Other Changes +Other changes ============= Support added for Python 3.8 diff --git a/docs/releasenotes/7.0.0.rst b/docs/releasenotes/7.0.0.rst index ed6026593..9504c974a 100644 --- a/docs/releasenotes/7.0.0.rst +++ b/docs/releasenotes/7.0.0.rst @@ -1,7 +1,7 @@ 7.0.0 ----- -Backwards Incompatible Changes +Backwards incompatible changes ============================== Python 2.7 @@ -78,7 +78,7 @@ bounds of resulting image. This may be useful in a subsequent .. _chain methods: https://en.wikipedia.org/wiki/Method_chaining -API Additions +API additions ============= Custom unidentified image error @@ -124,7 +124,7 @@ now also be loaded at another resolution:: with Image.open("drawing.wmf") as im: im.load(dpi=144) -Other Changes +Other changes ============= Image.__del__ diff --git a/docs/releasenotes/7.1.0.rst b/docs/releasenotes/7.1.0.rst index 0dd8669a5..c2aeb0f74 100644 --- a/docs/releasenotes/7.1.0.rst +++ b/docs/releasenotes/7.1.0.rst @@ -35,7 +35,7 @@ out-of-bounds reads via a crafted JP2 file. In ``libImaging/SgiRleDecode.c`` in Pillow through 7.0.0, a number of out-of-bounds reads exist in the parsing of SGI image files, a different issue than :cve:`2020-5311`. -API Changes +API changes =========== Allow saving of zero quality JPEG images @@ -50,7 +50,7 @@ been resolved. :: im = Image.open("hopper.jpg") im.save("out.jpg", quality=0) -API Additions +API additions ============= New channel operations @@ -101,7 +101,7 @@ Passing a different value on Windows or macOS will force taking a snapshot using the selected X server; pass an empty string to use the default X server. XCB support is not included in pre-compiled wheels for Windows and macOS. -Other Changes +Other changes ============= If present, only use alpha channel for bounding box diff --git a/docs/releasenotes/7.2.0.rst b/docs/releasenotes/7.2.0.rst index 91e54da19..12bafa8ce 100644 --- a/docs/releasenotes/7.2.0.rst +++ b/docs/releasenotes/7.2.0.rst @@ -1,7 +1,7 @@ 7.2.0 ----- -API Changes +API changes =========== Replaced TiffImagePlugin DEBUG with logging diff --git a/docs/releasenotes/8.0.0.rst b/docs/releasenotes/8.0.0.rst index 1fc245c9a..d0dde756f 100644 --- a/docs/releasenotes/8.0.0.rst +++ b/docs/releasenotes/8.0.0.rst @@ -1,7 +1,7 @@ 8.0.0 ----- -Backwards Incompatible Changes +Backwards incompatible changes ============================== Python 3.5 @@ -44,7 +44,7 @@ Removed Use instead ``product_model`` Unicode :py:attr:`~.CmsProfile.model` ======================== =================================================== -API Changes +API changes =========== ImageDraw.text: stroke_width @@ -67,7 +67,7 @@ Add MIME type to PsdImagePlugin "image/vnd.adobe.photoshop" is now registered as the :py:class:`.PsdImagePlugin.PsdImageFile` MIME type. -API Additions +API additions ============= Image.open: add formats parameter @@ -135,7 +135,7 @@ and :py:meth:`.FreeTypeFont.getbbox` return the bounding box of rendered text. These functions accept an ``anchor`` parameter, see :ref:`text-anchors` for details. -Other Changes +Other changes ============= Improved ellipse-drawing algorithm diff --git a/docs/releasenotes/8.1.0.rst b/docs/releasenotes/8.1.0.rst index 5c3993318..06e6d9974 100644 --- a/docs/releasenotes/8.1.0.rst +++ b/docs/releasenotes/8.1.0.rst @@ -26,7 +26,7 @@ leading to an out-of-bounds write in ``TiffDecode.c``. This potentially affects versions from 6.0.0 to 8.0.1, depending on the version of LibTIFF. This was reported through `Tidelift`_. -:cve:`2020-35655`: SGI Decode buffer overrun +:cve:`2020-35655`: SGI decode buffer overrun ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 byte read overflow in ``SgiRleDecode.c``, where the code was not correctly @@ -64,7 +64,7 @@ Makefile The ``install-venv`` target has been deprecated. -API Additions +API additions ============= Append images to ICO @@ -77,7 +77,7 @@ With this release, a list of images can be provided to the ``append_images`` par when saving, to replace the scaled down versions. This is the same functionality that already exists for the ICNS format. -Other Changes +Other changes ============= Makefile diff --git a/docs/releasenotes/8.1.1.rst b/docs/releasenotes/8.1.1.rst index 690421c2a..b8ad5a898 100644 --- a/docs/releasenotes/8.1.1.rst +++ b/docs/releasenotes/8.1.1.rst @@ -32,7 +32,7 @@ DOS attack. There is an out-of-bounds read in ``SgiRleDecode.c`` since Pillow 4.3.0. -Other Changes +Other changes ============= A crash with the feature flags for libimagequant, libjpeg-turbo, WebP and XCB on diff --git a/docs/releasenotes/8.2.0.rst b/docs/releasenotes/8.2.0.rst index 50fe9aa19..a59560695 100644 --- a/docs/releasenotes/8.2.0.rst +++ b/docs/releasenotes/8.2.0.rst @@ -74,7 +74,7 @@ Tk/Tcl 8.4 Support for Tk/Tcl 8.4 is deprecated and will be removed in Pillow 10.0.0 (2023-07-01), when Tk/Tcl 8.5 will be the minimum supported. -API Changes +API changes =========== Image.alpha_composite: dest @@ -107,7 +107,7 @@ removed. Instead, ``Image.getmodebase()``, ``Image.getmodetype()``, ``Image.getmodebandnames()``, ``Image.getmodebands()`` or ``ImageMode.getmode()`` can be used. -API Additions +API additions ============= getxmp() for JPEG images @@ -177,7 +177,7 @@ be specified through a keyword argument:: im.save("out.tif", icc_profile=...) -Other Changes +Other changes ============= GIF writer uses LZW encoding diff --git a/docs/releasenotes/8.3.0.rst b/docs/releasenotes/8.3.0.rst index 4ef914f64..c46240854 100644 --- a/docs/releasenotes/8.3.0.rst +++ b/docs/releasenotes/8.3.0.rst @@ -33,7 +33,7 @@ dictionary. The ``convert_dict_qtables`` method no longer performs any operations on the data given to it, has been deprecated and will be removed in Pillow 10.0.0 (2023-07-01). -API Changes +API changes =========== Changed WebP default "method" value when saving @@ -73,7 +73,7 @@ through :py:meth:`~PIL.Image.Image.getexif`. This also provides access to the GP EXIF IFDs, through ``im.getexif().get_ifd(0x8825)`` and ``im.getexif().get_ifd(0x8769)`` respectively. -API Additions +API additions ============= ImageOps.contain @@ -100,7 +100,7 @@ format, through the new ``bitmap_format`` argument:: im.save("out.ico", bitmap_format="bmp") -Other Changes +Other changes ============= Added DDS BC5 reading and uncompressed saving diff --git a/docs/releasenotes/8.3.2.rst b/docs/releasenotes/8.3.2.rst index 34ba703f7..e26a6ceda 100644 --- a/docs/releasenotes/8.3.2.rst +++ b/docs/releasenotes/8.3.2.rst @@ -20,7 +20,7 @@ bytes off the end of the allocated buffer from the heap. Present since Pillow 7. This bug was found by Google's `OSS-Fuzz`_ `CIFuzz`_ runs. -Other Changes +Other changes ============= Python 3.10 wheels diff --git a/docs/releasenotes/8.4.0.rst b/docs/releasenotes/8.4.0.rst index bdc8e8020..3bdf77d56 100644 --- a/docs/releasenotes/8.4.0.rst +++ b/docs/releasenotes/8.4.0.rst @@ -13,7 +13,7 @@ Before Pillow 8.3.0, ``ImagePalette`` required palette data of particular length default, and the size parameter could be used to override that. Pillow 8.3.0 removed the default required length, also removing the need for the size parameter. -API Additions +API additions ============= Added "transparency" argument for loading EPS images @@ -33,7 +33,7 @@ Added WalImageFile class :py:class:`PIL.Image.Image` instance. It now returns a dedicated :py:class:`PIL.WalImageFile.WalImageFile` class. -Other Changes +Other changes ============= Speed improvement when rotating square images diff --git a/docs/releasenotes/9.0.0.rst b/docs/releasenotes/9.0.0.rst index fee66b6d0..660e5514c 100644 --- a/docs/releasenotes/9.0.0.rst +++ b/docs/releasenotes/9.0.0.rst @@ -59,7 +59,7 @@ initializing ``ImagePath.Path``. .. _OSS-Fuzz: https://github.com/google/oss-fuzz -Backwards Incompatible Changes +Backwards incompatible changes ============================== Python 3.6 @@ -102,7 +102,7 @@ ImageFile.raise_ioerror has been removed. Use ``ImageFile.raise_oserror`` instead. -API Changes +API changes =========== Added line width parameter to ImageDraw polygon @@ -111,7 +111,7 @@ Added line width parameter to ImageDraw polygon An optional line ``width`` parameter has been added to ``ImageDraw.Draw.polygon``. -API Additions +API additions ============= ImageShow.XDGViewer @@ -132,7 +132,7 @@ Support has been added for the "title" argument in argument will also now be supported, e.g. ``im.show(title="My Image")`` and ``ImageShow.show(im, title="My Image")``. -Other Changes +Other changes ============= Convert subsequent GIF frames to RGB or RGBA diff --git a/docs/releasenotes/9.0.1.rst b/docs/releasenotes/9.0.1.rst index f65e3bcc2..5326afe78 100644 --- a/docs/releasenotes/9.0.1.rst +++ b/docs/releasenotes/9.0.1.rst @@ -21,7 +21,7 @@ While Pillow 9.0 restricted top-level builtins available to :py:meth:`!PIL.ImageMath.eval`, it did not prevent builtins available to lambda expressions. These are now also restricted. -Other Changes +Other changes ============= Pillow 9.0 added support for ``xdg-open`` as an image viewer, but there have been diff --git a/docs/releasenotes/9.1.0.rst b/docs/releasenotes/9.1.0.rst index 5b83d1e9c..72749ce8c 100644 --- a/docs/releasenotes/9.1.0.rst +++ b/docs/releasenotes/9.1.0.rst @@ -94,7 +94,7 @@ The stub image plugin ``FitsStubImagePlugin`` has been deprecated and will be re Pillow 10.0.0 (2023-07-01). FITS images can be read without a handler through :mod:`~PIL.FitsImagePlugin` instead. -API Changes +API changes =========== Raise an error when performing a negative crop @@ -137,7 +137,7 @@ On macOS, the last argument may need to be wrapped in quotes, e.g. Therefore ``requirements.txt`` has been removed along with the ``make install-req`` command for installing its contents. -API Additions +API additions ============= Added get_photoshop_blocks() to parse Photoshop TIFF tag @@ -193,7 +193,7 @@ palette. :: from PIL import GifImagePlugin GifImagePlugin.LOADING_STRATEGY = GifImagePlugin.LoadingStrategy.RGB_AFTER_DIFFERENT_PALETTE_ONLY -Other Changes +Other changes ============= musllinux wheels diff --git a/docs/releasenotes/9.2.0.rst b/docs/releasenotes/9.2.0.rst index 6e0647343..a3c9800b6 100644 --- a/docs/releasenotes/9.2.0.rst +++ b/docs/releasenotes/9.2.0.rst @@ -126,7 +126,7 @@ Use instead:: draw = ImageDraw.Draw(im) draw.text((100 / 2, 100 / 2), "Hello world", font=font, anchor="mm") -API Additions +API additions ============= Image.apply_transparency @@ -137,7 +137,7 @@ with "transparency" in ``im.info``, and apply the transparency to the palette in The image's palette mode will become "RGBA", and "transparency" will be removed from ``im.info``. -Other Changes +Other changes ============= Using gnome-screenshot on Linux diff --git a/docs/releasenotes/9.3.0.rst b/docs/releasenotes/9.3.0.rst index e5987ce08..bb1e731fd 100644 --- a/docs/releasenotes/9.3.0.rst +++ b/docs/releasenotes/9.3.0.rst @@ -28,7 +28,7 @@ This was introduced in Pillow 9.2.0, found with `OSS-Fuzz`_ and fixed by limitin ``SAMPLESPERPIXEL`` to the number of planes that we can decode. -API Additions +API additions ============= Allow default ImageDraw font to be set @@ -65,7 +65,7 @@ The data from :py:data:`~PIL.ExifTags.TAGS` and :py:data:`~PIL.ExifTags.GPS`. -Other Changes +Other changes ============= Python 3.11 wheels diff --git a/docs/releasenotes/9.4.0.rst b/docs/releasenotes/9.4.0.rst index 37f26a22c..3b202157d 100644 --- a/docs/releasenotes/9.4.0.rst +++ b/docs/releasenotes/9.4.0.rst @@ -20,7 +20,7 @@ Pillow attempted to dereference a null pointer in ``ImageFont``, leading to a crash. An error is now raised instead. This has been present since Pillow 8.0.0. -API Additions +API additions ============= Added start position for getmask and getmask2 @@ -88,7 +88,7 @@ When saving a JPEG image, a comment can now be written from im.save(out, comment="Test comment") -Other Changes +Other changes ============= Added support for DDS L and LA images diff --git a/docs/releasenotes/9.5.0.rst b/docs/releasenotes/9.5.0.rst index 501479bb6..6bf2079c8 100644 --- a/docs/releasenotes/9.5.0.rst +++ b/docs/releasenotes/9.5.0.rst @@ -37,7 +37,7 @@ be removed in Pillow 11 (2024-10-15). This class was only made as a helper to be used internally, so there is no replacement. If you need this functionality though, it is a very short class that can easily be recreated in your own code. -API Additions +API additions ============= QOI file format @@ -71,7 +71,7 @@ If OpenJPEG 2.4.0 or later is available and the ``plt`` keyword argument is present and true when saving JPEG2000 images, tell the encoder to generate PLT markers. -Other Changes +Other changes ============= Added support for saving PDFs in RGBA mode diff --git a/docs/releasenotes/index.rst b/docs/releasenotes/index.rst index a116ef056..5d7b21d59 100644 --- a/docs/releasenotes/index.rst +++ b/docs/releasenotes/index.rst @@ -1,4 +1,4 @@ -Release Notes +Release notes ============= Pillow is released quarterly on January 2nd, April 1st, July 1st and October 15th. diff --git a/docs/releasenotes/template.rst b/docs/releasenotes/template.rst index cfc7221a3..a453d2a43 100644 --- a/docs/releasenotes/template.rst +++ b/docs/releasenotes/template.rst @@ -14,7 +14,7 @@ TODO TODO -Backwards Incompatible Changes +Backwards incompatible changes ============================== TODO @@ -28,7 +28,7 @@ TODO TODO -API Changes +API changes =========== TODO @@ -36,7 +36,7 @@ TODO TODO -API Additions +API additions ============= TODO @@ -44,7 +44,7 @@ TODO TODO -Other Changes +Other changes ============= TODO From 58e48745cc7b6c6f7dd26a50fe68d1a82ea51562 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Mon, 21 Apr 2025 19:14:08 +1000 Subject: [PATCH 17/36] Add list of third-party plugins (#8910) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- docs/handbook/appendices.rst | 1 + docs/handbook/third-party-plugins.rst | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 docs/handbook/third-party-plugins.rst diff --git a/docs/handbook/appendices.rst b/docs/handbook/appendices.rst index 347a8848b..c20d8bc8b 100644 --- a/docs/handbook/appendices.rst +++ b/docs/handbook/appendices.rst @@ -8,4 +8,5 @@ Appendices image-file-formats text-anchors + third-party-plugins writing-your-own-image-plugin diff --git a/docs/handbook/third-party-plugins.rst b/docs/handbook/third-party-plugins.rst new file mode 100644 index 000000000..a189a5773 --- /dev/null +++ b/docs/handbook/third-party-plugins.rst @@ -0,0 +1,18 @@ +Third-party plugins +=================== + +Pillow uses a plugin model which allows users to add their own +decoders and encoders to the library, without any changes to the library +itself. + +Here is a list of PyPI projects that offer additional plugins: + +* :pypi:`DjvuRleImagePlugin`: Plugin for the DjVu RLE image format as defined in the DjVuLibre docs. +* :pypi:`heif-image-plugin`: Simple HEIF/HEIC images plugin, based on the pyheif library. +* :pypi:`jxlpy`: Introduces reading and writing support for JPEG XL. +* :pypi:`pillow-heif`: Python bindings to libheif for working with HEIF images. +* :pypi:`pillow-jpls`: Plugin for the JPEG-LS codec, based on the Charls JPEG-LS implemetation. Python bindings implemented using pybind11. +* :pypi:`pillow-jxl-plugin`: Plugin for JPEG-XL, using Rust for bindings. +* :pypi:`pillow-mbm`: Adds support for KSP's proprietary MBM texture format. +* :pypi:`pillow-svg`: Implements basic SVG read support. Supports basic paths, shapes, and text. +* :pypi:`raw-pillow-opener`: Simple camera raw opener, based on the rawpy library. From 225182414c3c5cccc2fa42b3dd47147ef06790f9 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 25 Apr 2025 17:14:13 +1000 Subject: [PATCH 18/36] libavif below 1.0 is not supported --- src/PIL/AvifImagePlugin.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/PIL/AvifImagePlugin.py b/src/PIL/AvifImagePlugin.py index b2c5ab15d..366e0c864 100644 --- a/src/PIL/AvifImagePlugin.py +++ b/src/PIL/AvifImagePlugin.py @@ -16,7 +16,6 @@ except ImportError: # Decoder options as module globals, until there is a way to pass parameters # to Image.open (see https://github.com/python-pillow/Pillow/issues/569) DECODE_CODEC_CHOICE = "auto" -# Decoding is only affected by this for libavif **0.8.4** or greater. DEFAULT_MAX_THREADS = 0 From 4c2227758ec7bda10213220dc022e0e105533391 Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Sun, 27 Apr 2025 07:09:53 -0400 Subject: [PATCH 19/36] Add template for quarterly release issue --- .github/ISSUE_TEMPLATE/RELEASE.md | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/RELEASE.md diff --git a/.github/ISSUE_TEMPLATE/RELEASE.md b/.github/ISSUE_TEMPLATE/RELEASE.md new file mode 100644 index 000000000..db4c94a09 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/RELEASE.md @@ -0,0 +1,45 @@ +--- +name: Release +about: Schedule a release +--- + +## Main Release + +Released quarterly on January 2nd, April 1st, July 1st and October 15th. + +* [ ] Open a release ticket e.g. https://github.com/python-pillow/Pillow/issues/3154 +* [ ] Develop and prepare release in `main` branch. + * [ ] Add release notes for 11.2.1 https://github.com/python-pillow/Pillow/pull/8885 +* [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) to confirm passing tests in `main` branch. +* [ ] Check that all the wheel builds pass the tests in the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) jobs by manually triggering them. +* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), update version identifier in `src/PIL/_version.py` +* [ ] Run pre-release check via `make release-test` in a freshly cloned repo. +* [ ] Create branch and tag for release e.g.: + ```bash + git branch [[MAJOR.MINOR.PATCH]] + git tag [[MAJOR.MINOR.PATCH]] + git push --tags + ``` +* [ ] Check the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) has passed, including the "Upload release to PyPI" job. This will have been triggered by the new tag. +* [ ] Publish the [release on GitHub](https://github.com/python-pillow/Pillow/releases). +* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), increment and append `.dev0` to version identifier in `src/PIL/_version.py` and then: + ```bash + git push --all + ``` + +## Publicize Release + +* [ ] Announce release availability via [Mastodon](https://fosstodon.org/@pillow) e.g. https://fosstodon.org/@pillow/110639450470725321 + +## Documentation + +* [ ] Make sure the [default version for Read the Docs](https://pillow.readthedocs.io/en/stable/) is up-to-date with the release changes + +## Docker Images + +* [ ] Update Pillow in the Docker Images repository + ```bash + git clone https://github.com/python-pillow/docker-images + cd docker-images + ./update-pillow-tag.sh [[release tag]] + ``` From da9d5522f7c7cd96d99a25a580ac6488f63bedaf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Apr 2025 21:35:08 +1000 Subject: [PATCH 20/36] Update dependency cibuildwheel to v2.23.3 (#8931) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .ci/requirements-cibw.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/requirements-cibw.txt b/.ci/requirements-cibw.txt index db5f89c9a..0e314b8bf 100644 --- a/.ci/requirements-cibw.txt +++ b/.ci/requirements-cibw.txt @@ -1 +1 @@ -cibuildwheel==2.23.2 +cibuildwheel==2.23.3 From 8ab3bc469ec4ebcc7e5bc5a848fd59bd4a9a8221 Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Sun, 27 Apr 2025 08:21:48 -0400 Subject: [PATCH 21/36] Update .github/ISSUE_TEMPLATE/RELEASE.md Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/RELEASE.md b/.github/ISSUE_TEMPLATE/RELEASE.md index db4c94a09..c5bae8b2a 100644 --- a/.github/ISSUE_TEMPLATE/RELEASE.md +++ b/.github/ISSUE_TEMPLATE/RELEASE.md @@ -9,7 +9,7 @@ Released quarterly on January 2nd, April 1st, July 1st and October 15th. * [ ] Open a release ticket e.g. https://github.com/python-pillow/Pillow/issues/3154 * [ ] Develop and prepare release in `main` branch. - * [ ] Add release notes for 11.2.1 https://github.com/python-pillow/Pillow/pull/8885 + * [ ] Add release notes e.g. https://github.com/python-pillow/Pillow/pull/8885 * [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) to confirm passing tests in `main` branch. * [ ] Check that all the wheel builds pass the tests in the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) jobs by manually triggering them. * [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), update version identifier in `src/PIL/_version.py` From 0205fb4fa2e9905dcec12715d60b5f4a75e30266 Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Sun, 27 Apr 2025 08:21:57 -0400 Subject: [PATCH 22/36] Update .github/ISSUE_TEMPLATE/RELEASE.md Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/RELEASE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/RELEASE.md b/.github/ISSUE_TEMPLATE/RELEASE.md index c5bae8b2a..72499e01d 100644 --- a/.github/ISSUE_TEMPLATE/RELEASE.md +++ b/.github/ISSUE_TEMPLATE/RELEASE.md @@ -16,8 +16,8 @@ Released quarterly on January 2nd, April 1st, July 1st and October 15th. * [ ] Run pre-release check via `make release-test` in a freshly cloned repo. * [ ] Create branch and tag for release e.g.: ```bash - git branch [[MAJOR.MINOR.PATCH]] - git tag [[MAJOR.MINOR.PATCH]] + git branch [[MAJOR.MINOR]].0 + git tag [[MAJOR.MINOR]].0 git push --tags ``` * [ ] Check the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) has passed, including the "Upload release to PyPI" job. This will have been triggered by the new tag. From 6f672191ad83b522c47e1facdeb12889f91a5824 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Sun, 27 Apr 2025 22:30:35 +1000 Subject: [PATCH 23/36] Branch uses .x --- .github/ISSUE_TEMPLATE/RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/RELEASE.md b/.github/ISSUE_TEMPLATE/RELEASE.md index 72499e01d..5dd070886 100644 --- a/.github/ISSUE_TEMPLATE/RELEASE.md +++ b/.github/ISSUE_TEMPLATE/RELEASE.md @@ -16,7 +16,7 @@ Released quarterly on January 2nd, April 1st, July 1st and October 15th. * [ ] Run pre-release check via `make release-test` in a freshly cloned repo. * [ ] Create branch and tag for release e.g.: ```bash - git branch [[MAJOR.MINOR]].0 + git branch [[MAJOR.MINOR]].x git tag [[MAJOR.MINOR]].0 git push --tags ``` From 6881863eab8106a6a0e3cb788f11c7d0d71cf124 Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Sun, 27 Apr 2025 15:37:42 -0400 Subject: [PATCH 24/36] Update .github/ISSUE_TEMPLATE/RELEASE.md Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/RELEASE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/RELEASE.md b/.github/ISSUE_TEMPLATE/RELEASE.md index 5dd070886..97701f30e 100644 --- a/.github/ISSUE_TEMPLATE/RELEASE.md +++ b/.github/ISSUE_TEMPLATE/RELEASE.md @@ -1,6 +1,7 @@ --- -name: Release -about: Schedule a release +name: "Maintainers only: Release" +about: For maintainers to schedule a quarterly release +labels: Release --- ## Main Release From fcaffa22293c41851e9e28b3229b981398deacda Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Sun, 27 Apr 2025 15:37:50 -0400 Subject: [PATCH 25/36] Update .github/ISSUE_TEMPLATE/RELEASE.md Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/RELEASE.md b/.github/ISSUE_TEMPLATE/RELEASE.md index 97701f30e..d7b246378 100644 --- a/.github/ISSUE_TEMPLATE/RELEASE.md +++ b/.github/ISSUE_TEMPLATE/RELEASE.md @@ -4,7 +4,7 @@ about: For maintainers to schedule a quarterly release labels: Release --- -## Main Release +## Main release Released quarterly on January 2nd, April 1st, July 1st and October 15th. From 1eba198b62d1444e72f598db805121022a19ab04 Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Sun, 27 Apr 2025 15:37:56 -0400 Subject: [PATCH 26/36] Update .github/ISSUE_TEMPLATE/RELEASE.md Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/RELEASE.md b/.github/ISSUE_TEMPLATE/RELEASE.md index d7b246378..16bf30fdc 100644 --- a/.github/ISSUE_TEMPLATE/RELEASE.md +++ b/.github/ISSUE_TEMPLATE/RELEASE.md @@ -28,7 +28,7 @@ Released quarterly on January 2nd, April 1st, July 1st and October 15th. git push --all ``` -## Publicize Release +## Publicize release * [ ] Announce release availability via [Mastodon](https://fosstodon.org/@pillow) e.g. https://fosstodon.org/@pillow/110639450470725321 From e6ff42303b54d16e213b2152984a39f07742fcaf Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Sun, 27 Apr 2025 15:38:02 -0400 Subject: [PATCH 27/36] Update .github/ISSUE_TEMPLATE/RELEASE.md Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/RELEASE.md b/.github/ISSUE_TEMPLATE/RELEASE.md index 16bf30fdc..20d1ac79b 100644 --- a/.github/ISSUE_TEMPLATE/RELEASE.md +++ b/.github/ISSUE_TEMPLATE/RELEASE.md @@ -36,7 +36,7 @@ Released quarterly on January 2nd, April 1st, July 1st and October 15th. * [ ] Make sure the [default version for Read the Docs](https://pillow.readthedocs.io/en/stable/) is up-to-date with the release changes -## Docker Images +## Docker images * [ ] Update Pillow in the Docker Images repository ```bash From e140027262b95d26080b5d58e095d2e294609e69 Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Sun, 27 Apr 2025 15:45:40 -0400 Subject: [PATCH 28/36] Move checklist to issue template --- RELEASING.md | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 932beb2c2..b626d7d23 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,27 +7,8 @@ information about how the version numbers line up with releases. Released quarterly on January 2nd, April 1st, July 1st and October 15th. -* [ ] Open a release ticket e.g. https://github.com/python-pillow/Pillow/issues/3154 -* [ ] Develop and prepare release in `main` branch. -* [ ] Check [GitHub Actions](https://github.com/python-pillow/Pillow/actions) to confirm passing tests in `main` branch. -* [ ] Check that all the wheel builds pass the tests in the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) jobs by manually triggering them. -* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), update version identifier in `src/PIL/_version.py` -* [ ] Run pre-release check via `make release-test` in a freshly cloned repo. -* [ ] Create branch and tag for release e.g.: - ```bash - git branch 5.2.x - git tag 5.2.0 - git push --tags - ``` -* [ ] Check the [GitHub Actions "Wheels" workflow](https://github.com/python-pillow/Pillow/actions/workflows/wheels.yml) - has passed, including the "Upload release to PyPI" job. This will have been triggered - by the new tag. -* [ ] Publish the [release on GitHub](https://github.com/python-pillow/Pillow/releases). -* [ ] In compliance with [PEP 440](https://peps.python.org/pep-0440/), - increment and append `.dev0` to version identifier in `src/PIL/_version.py` and then: - ```bash - git push --all - ``` +* [ ] Create a new issue and select the "Release" template. + ## Point Release Released as needed for security, installation or critical bug fixes. From f1d5cdaa07fbf4377d3cf4c68377e64998619b60 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 28 Apr 2025 06:17:47 +1000 Subject: [PATCH 29/36] Use sentence case --- README.md | 4 ++-- RELEASING.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1cae558ad..365d356a0 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ This library provides extensive file format support, an efficient internal repre The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool. -## More Information +## More information - [Documentation](https://pillow.readthedocs.io/) - [Installation](https://pillow.readthedocs.io/en/latest/installation/basic-installation.html) @@ -107,6 +107,6 @@ The core image library is designed for fast access to data stored in a few basic - [Changelog](https://github.com/python-pillow/Pillow/releases) - [Pre-fork](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst#pre-fork) -## Report a Vulnerability +## Report a vulnerability To report a security vulnerability, please follow the procedure described in the [Tidelift security policy](https://tidelift.com/docs/security). diff --git a/RELEASING.md b/RELEASING.md index b626d7d23..c160e96f5 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,15 +1,15 @@ -# Release Checklist +# Release checklist See https://pillow.readthedocs.io/en/stable/releasenotes/versioning.html for information about how the version numbers line up with releases. -## Main Release +## Main release Released quarterly on January 2nd, April 1st, July 1st and October 15th. * [ ] Create a new issue and select the "Release" template. -## Point Release +## Point release Released as needed for security, installation or critical bug fixes. @@ -39,7 +39,7 @@ Released as needed for security, installation or critical bug fixes. git push ``` -## Embargoed Release +## Embargoed release Released as needed privately to individual vendors for critical security-related bug fixes. @@ -63,7 +63,7 @@ Released as needed privately to individual vendors for critical security-related git push origin 2.5.x ``` -## Publicize Release +## Publicize release * [ ] Announce release availability via [Mastodon](https://fosstodon.org/@pillow) e.g. https://fosstodon.org/@pillow/110639450470725321 @@ -71,7 +71,7 @@ Released as needed privately to individual vendors for critical security-related * [ ] Make sure the [default version for Read the Docs](https://pillow.readthedocs.io/en/stable/) is up-to-date with the release changes -## Docker Images +## Docker images * [ ] Update Pillow in the Docker Images repository ```bash From dbe538a1307dc14c3ecb685819f28f22c02060ab Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 28 Apr 2025 06:19:18 +1000 Subject: [PATCH 30/36] Updated template name --- RELEASING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASING.md b/RELEASING.md index c160e96f5..3c6188c82 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,7 +7,7 @@ information about how the version numbers line up with releases. Released quarterly on January 2nd, April 1st, July 1st and October 15th. -* [ ] Create a new issue and select the "Release" template. +* [ ] Create a new issue and select the "Maintainers only: Release" template. ## Point release From 47bebfc801c3905979715d0d22a9560c395581e6 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 29 Apr 2025 14:57:10 +1000 Subject: [PATCH 31/36] Allow loading state from Pillow < 11.2.1 --- Tests/test_pickle.py | 10 ++++++++++ src/PIL/ImageFile.py | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Tests/test_pickle.py b/Tests/test_pickle.py index 1c48cb743..54cef00ad 100644 --- a/Tests/test_pickle.py +++ b/Tests/test_pickle.py @@ -162,3 +162,13 @@ def test_pickle_font_file(tmp_path: Path, protocol: int) -> None: # Assert helper_assert_pickled_font_images(font, unpickled_font) + + +def test_load_earlier_data() -> None: + im = pickle.loads( + b"\x80\x04\x95@\x00\x00\x00\x00\x00\x00\x00\x8c\x12PIL.PngImagePlugin" + b"\x94\x8c\x0cPngImageFile\x94\x93\x94)\x81\x94]\x94(}\x94\x8c\x01L\x94K\x01" + b"K\x01\x86\x94NC\x01\x00\x94eb." + ) + assert im.mode == "L" + assert im.size == (1, 1) diff --git a/src/PIL/ImageFile.py b/src/PIL/ImageFile.py index bcb7d462e..bf556a2c6 100644 --- a/src/PIL/ImageFile.py +++ b/src/PIL/ImageFile.py @@ -257,7 +257,8 @@ class ImageFile(Image.Image): def __setstate__(self, state: list[Any]) -> None: self.tile = [] - self.filename = state[5] + if len(state) > 5: + self.filename = state[5] super().__setstate__(state) def verify(self) -> None: From 07df26aa5d2cf0937737c787bc88ff05454e53d2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 29 Apr 2025 15:37:45 +0300 Subject: [PATCH 32/36] Refactor docs `Makefile` (#8933) Co-authored-by: Andrew Murray --- docs/Makefile | 42 ++++++++++++++++++------------------------ docs/make.bat | 2 -- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 1e6c06ede..8c1019294 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,17 +3,23 @@ # You can set these variables from the command line. PYTHON = python3 -SPHINXOPTS = SPHINXBUILD = $(PYTHON) -m sphinx.cmd.build -PAPER = +SPHINXOPTS = --fail-on-warning BUILDDIR = _build +BUILDER = html +JOBS = auto +PAPER = # Internal variables. PAPEROPT_a4 = --define latex_paper_size=a4 PAPEROPT_letter = --define latex_paper_size=letter -ALLSPHINXOPTS = --doctree-dir $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +ALLSPHINXOPTS = --builder $(BUILDER) \ + --doctree-dir $(BUILDDIR)/doctrees \ + --jobs $(JOBS) \ + $(PAPEROPT_$(PAPER)) \ + $(SPHINXOPTS) \ + . $(BUILDDIR)/$(BUILDER) .PHONY: help help: @@ -36,31 +42,19 @@ install-sphinx: .PHONY: html html: $(MAKE) install-sphinx - $(SPHINXBUILD) --builder html --fail-on-warning --keep-going $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + $(SPHINXBUILD) $(ALLSPHINXOPTS) .PHONY: dirhtml -dirhtml: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." +dirhtml: BUILDER = dirhtml +dirhtml: html .PHONY: singlehtml -singlehtml: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." +singlehtml: BUILDER = singlehtml +singlehtml: html .PHONY: linkcheck -linkcheck: - $(MAKE) install-sphinx - $(SPHINXBUILD) --builder linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck -j auto - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." +linkcheck: BUILDER = linkcheck +linkcheck: html .PHONY: htmlview htmlview: html diff --git a/docs/make.bat b/docs/make.bat index 4126f786b..9d15537fb 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -7,10 +7,8 @@ if "%SPHINXBUILD%" == "" ( ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help From d02f7868732cdacc227dd794f6ff84bd6f1858c9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 19:16:40 +1000 Subject: [PATCH 33/36] [pre-commit.ci] pre-commit autoupdate (#8944) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/zizmor.yml | 7 +++++++ .pre-commit-config.yaml | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .github/zizmor.yml diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 000000000..5bdc48c30 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,7 @@ +# Configuration for the zizmor static analysis tool, run via pre-commit in CI +# https://woodruffw.github.io/zizmor/configuration/ +rules: + unpinned-uses: + config: + policies: + "*": ref-pin diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 140ce33be..e15e6f639 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.4 + rev: v0.11.8 hooks: - id: ruff args: [--exit-non-zero-on-fix] @@ -24,7 +24,7 @@ repos: exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$) - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.0 + rev: v20.1.3 hooks: - id: clang-format types: [c] @@ -51,14 +51,14 @@ repos: exclude: ^.github/.*TEMPLATE|^Tests/(fonts|images)/ - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.32.1 + rev: 0.33.0 hooks: - id: check-github-workflows - id: check-readthedocs - id: check-renovate - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.5.2 + rev: v1.6.0 hooks: - id: zizmor From c7193f74fc5ce1a0fe1742a0845165024be45ef5 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 8 May 2025 20:10:34 +1000 Subject: [PATCH 34/36] Updated error message --- Tests/test_image_resample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/test_image_resample.py b/Tests/test_image_resample.py index ce6209c0d..73b25ed51 100644 --- a/Tests/test_image_resample.py +++ b/Tests/test_image_resample.py @@ -462,7 +462,7 @@ class TestCoreResampleBox: im.resize((32, 32), resample, (20, 20, 20, 100)) im.resize((32, 32), resample, (20, 20, 100, 20)) - with pytest.raises(TypeError, match="must be sequence of length 4"): + with pytest.raises(TypeError, match="must be (sequence|tuple) of length 4"): im.resize((32, 32), resample, (im.width, im.height)) # type: ignore[arg-type] with pytest.raises(ValueError, match="can't be negative"): From 71a916ad53502ed8cb8ea71c40081c169c3eae0f Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 8 May 2025 22:10:22 +1000 Subject: [PATCH 35/36] Do not install PyQt6 on Python 3.14 --- .github/workflows/test-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index bf8ec2f2c..12f06ee03 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -84,7 +84,7 @@ jobs: python3 -m pip install --upgrade pip - name: Install CPython dependencies - if: "!contains(matrix.python-version, 'pypy') && matrix.architecture != 'x86'" + if: "!contains(matrix.python-version, 'pypy') && !contains(matrix.python-version, '3.14') && matrix.architecture != 'x86'" run: | python3 -m pip install PyQt6 From 215069af5ddec6f4d3b92b8bc7554a10e2efb669 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 8 May 2025 22:13:13 +1000 Subject: [PATCH 36/36] Added support for Python 3.14 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5ecd6b816..5d41e27d9 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ WEBP_ROOT = None ZLIB_ROOT = None FUZZING_BUILD = "LIB_FUZZING_ENGINE" in os.environ -if sys.platform == "win32" and sys.version_info >= (3, 14): +if sys.platform == "win32" and sys.version_info >= (3, 15): import atexit atexit.register(