Skip to content

Commit 7a0092f

Browse files
committed
Remove incomplete 11.2.0 release, bill as 11.2.1 instead
1 parent 8dafc38 commit 7a0092f

File tree

8 files changed

+120
-130
lines changed

8 files changed

+120
-130
lines changed

docs/deprecations.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ ExifTags.IFD.Makernote
186186
Image.Image.get_child_images()
187187
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188188

189-
.. deprecated:: 11.2.0
189+
.. deprecated:: 11.2.1
190190

191191
``Image.Image.get_child_images()`` has been deprecated. and will be removed in Pillow
192192
13 (2026-10-15). It will be moved to ``ImageFile.ImageFile.get_child_images()``. The

docs/handbook/image-file-formats.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ DXT1 and DXT5 pixel formats can be read, only in ``RGBA`` mode.
170170
in ``P`` mode.
171171

172172

173-
.. versionadded:: 11.2.0
173+
.. versionadded:: 11.2.1
174174
DXT1, DXT3, DXT5, BC2, BC3 and BC5 pixel formats can be saved::
175175

176176
im.save(out, pixel_format="DXT1")

docs/reference/ImageDraw.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Methods
391391
the relative alignment of lines. Use the ``anchor`` parameter to
392392
specify the alignment to ``xy``.
393393

394-
.. versionadded:: 11.2.0 ``"justify"``
394+
.. versionadded:: 11.2.1 ``"justify"``
395395
:param direction: Direction of the text. It can be ``"rtl"`` (right to
396396
left), ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
397397
Requires libraqm.
@@ -462,7 +462,7 @@ Methods
462462
the relative alignment of lines. Use the ``anchor`` parameter to
463463
specify the alignment to ``xy``.
464464

465-
.. versionadded:: 11.2.0 ``"justify"``
465+
.. versionadded:: 11.2.1 ``"justify"``
466466
:param direction: Direction of the text. It can be ``"rtl"`` (right to
467467
left), ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
468468
Requires libraqm.
@@ -609,7 +609,7 @@ Methods
609609
the relative alignment of lines. Use the ``anchor`` parameter to
610610
specify the alignment to ``xy``.
611611

612-
.. versionadded:: 11.2.0 ``"justify"``
612+
.. versionadded:: 11.2.1 ``"justify"``
613613
:param direction: Direction of the text. It can be ``"rtl"`` (right to
614614
left), ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
615615
Requires libraqm.
@@ -663,7 +663,7 @@ Methods
663663
the relative alignment of lines. Use the ``anchor`` parameter to
664664
specify the alignment to ``xy``.
665665

666-
.. versionadded:: 11.2.0 ``"justify"``
666+
.. versionadded:: 11.2.1 ``"justify"``
667667
:param direction: Direction of the text. It can be ``"rtl"`` (right to
668668
left), ``"ltr"`` (left to right) or ``"ttb"`` (top to bottom).
669669
Requires libraqm.

docs/reference/ImageGrab.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ or the clipboard to a PIL image memory.
4444
:param window:
4545
HWND, to capture a single window. Windows only.
4646

47-
.. versionadded:: 11.2.0
47+
.. versionadded:: 11.2.1
4848
:return: An image
4949

5050
.. py:function:: grabclipboard()

docs/releasenotes/11.2.0.rst

-116
This file was deleted.

docs/releasenotes/11.2.1.rst

+112-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,118 @@
11
11.2.1
22
------
33

4+
.. warning::
5+
6+
The release of Pillow *11.2.0* was halted prematurely, due to hitting PyPI's
7+
project size limit and concern over the size of Pillow wheels containing libavif.
8+
The PyPI limit has now been increased and Pillow *11.2.1* has been released
9+
instead, without libavif included in the wheels.
10+
To avoid confusion, the incomplete 11.2.0 release has been removed from PyPI.
11+
12+
Security
13+
========
14+
15+
Undefined shift when loading compressed DDS images
16+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17+
18+
When loading some compressed DDS formats, an integer was bitshifted by 24 places to
19+
generate the 32 bits of the lookup table. This was undefined behaviour, and has been
20+
present since Pillow 3.4.0.
21+
22+
Deprecations
23+
============
24+
25+
Image.Image.get_child_images()
26+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27+
28+
.. deprecated:: 11.2.1
29+
30+
``Image.Image.get_child_images()`` has been deprecated. and will be removed in Pillow
31+
13 (2026-10-15). It will be moved to ``ImageFile.ImageFile.get_child_images()``. The
32+
method uses an image's file pointer, and so child images could only be retrieved from
33+
an :py:class:`PIL.ImageFile.ImageFile` instance.
34+
35+
API Changes
36+
===========
37+
38+
``append_images`` no longer requires ``save_all``
39+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40+
41+
Previously, ``save_all`` was required to in order to use ``append_images``. Now,
42+
``save_all`` will default to ``True`` if ``append_images`` is not empty and the format
43+
supports saving multiple frames::
44+
45+
im.save("out.gif", append_images=ims)
46+
47+
API Additions
48+
=============
49+
50+
``"justify"`` multiline text alignment
51+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52+
53+
In addition to ``"left"``, ``"center"`` and ``"right"``, multiline text can also be
54+
aligned using ``"justify"`` in :py:mod:`~PIL.ImageDraw`::
55+
56+
from PIL import Image, ImageDraw
57+
im = Image.new("RGB", (50, 25))
58+
draw = ImageDraw.Draw(im)
59+
draw.multiline_text((0, 0), "Multiline\ntext 1", align="justify")
60+
draw.multiline_textbbox((0, 0), "Multiline\ntext 2", align="justify")
61+
62+
Specify window in ImageGrab on Windows
63+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
65+
When using :py:meth:`~PIL.ImageGrab.grab`, a specific window can be selected using the
66+
HWND::
67+
68+
from PIL import ImageGrab
69+
ImageGrab.grab(window=hwnd)
70+
71+
Check for MozJPEG
72+
^^^^^^^^^^^^^^^^^
73+
74+
You can check if Pillow has been built against the MozJPEG version of the
75+
libjpeg library, and what version of MozJPEG is being used::
76+
77+
from PIL import features
78+
features.check_feature("mozjpeg") # True or False
79+
features.version_feature("mozjpeg") # "4.1.1" for example, or None
80+
81+
Saving compressed DDS images
82+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83+
84+
Compressed DDS images can now be saved using a ``pixel_format`` argument. DXT1, DXT3,
85+
DXT5, BC2, BC3 and BC5 are supported::
86+
87+
im.save("out.dds", pixel_format="DXT1")
88+
89+
Other Changes
90+
=============
91+
92+
Arrow support
93+
^^^^^^^^^^^^^
94+
95+
`Arrow <https://arrow.apache.org/>`__ is an in-memory data exchange format that is the
96+
spiritual successor to the NumPy array interface. It provides for zero-copy access to
97+
columnar data, which in our case is ``Image`` data.
98+
99+
To create an image with zero-copy shared memory from an object exporting the
100+
arrow_c_array interface protocol::
101+
102+
from PIL import Image
103+
import pyarrow as pa
104+
arr = pa.array([0]*(5*5*4), type=pa.uint8())
105+
im = Image.fromarrow(arr, 'RGBA', (5, 5))
106+
107+
Pillow images can also be converted to Arrow objects::
108+
109+
from PIL import Image
110+
import pyarrow as pa
111+
im = Image.open('hopper.jpg')
112+
arr = pa.array(im)
113+
4114
Reading and writing AVIF images
5115
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6116

7-
The release of Pillow 11.2.0 was halted prematurely, due to concern over the size of
8-
Pillow wheels containing libavif.
9-
10-
Instead, Pillow 11.2.1's wheels do not contain libavif. If you wish to read and write
11-
AVIF images, you will need to build Pillow from source with libavif 1.0.0 or later.
117+
Pillow can now read and write AVIF images when built from source with libavif 1.0.0
118+
or later.

docs/releasenotes/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ expected to be backported to earlier versions.
1515
:maxdepth: 2
1616

1717
11.2.1
18-
11.2.0
1918
11.1.0
2019
11.0.0
2120
10.4.0

src/PIL/Image.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3362,7 +3362,7 @@ def fromarrow(
33623362
33633363
See: :ref:`arrow-support` for more detailed information
33643364
3365-
.. versionadded:: 11.2.0
3365+
.. versionadded:: 11.2.1
33663366
33673367
"""
33683368
if not hasattr(obj, "__arrow_c_array__"):

0 commit comments

Comments
 (0)