You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/releasenotes/5.3.0.rst
+19-14Lines changed: 19 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,24 @@
1
1
5.3.0
2
2
-----
3
3
4
+
API Changes
5
+
===========
6
+
7
+
Image size
8
+
^^^^^^^^^^
9
+
10
+
If you attempt to set the size of an image directly, e.g.
11
+
``im.size = (100, 100)``, you will now receive an ``AttributeError``. This is
12
+
not about removing existing functionality, but instead about raising an
13
+
explicit error to prevent later consequences. The ``resize`` method is the
14
+
correct way to change an image's size.
15
+
16
+
The exceptions to this are:
17
+
18
+
* The ICO and ICNS image formats, which use ``im.size = (100, 100)`` to select a subimage.
19
+
* The TIFF image format, which now has a ``DeprecationWarning`` for this action, as direct image size setting was previously necessary to work around an issue with tile extents.
20
+
21
+
4
22
API Additions
5
23
=============
6
24
@@ -28,6 +46,7 @@ Now it supports three-color mapping with the optional ``mid`` parameter, and
28
46
the positions for all three color arguments can each be optionally specified
29
47
(``blackpoint``, ``whitepoint`` and ``midpoint``).
@@ -39,20 +58,6 @@ and size, new method ``ImageOps.pad`` pads images to fill a requested aspect
39
58
ratio and size, filling new space with a provided ``color`` and positioning the
40
59
image within the new area through a ``centering`` argument.
41
60
42
-
Image Size
43
-
==========
44
-
45
-
If you attempt to set the size of an image directly, e.g.
46
-
``im.size = (100, 100)``, you will now receive an ``AttributeError``. This is
47
-
not about removing existing functionality, but instead about raising an
48
-
explicit error to prevent later consequences. The ``resize`` method is the
49
-
correct way to change an image's size.
50
-
51
-
The exceptions to this are:
52
-
53
-
* The ICO and ICNS image formats, which use ``im.size = (100, 100)`` to select a subimage.
54
-
* The TIFF image format, which now has a ``DeprecationWarning`` for this action, as direct image size setting was previously necessary to work around an issue with tile extents.
0 commit comments