4
4
Deprecations
5
5
============
6
6
7
- Tk/Tcl 8.4
8
- ^^^^^^^^^^
9
-
10
- Support for Tk/Tcl 8.4 is deprecated and will be removed in Pillow 10.0.0 (2023-01-02),
11
- when Tk/Tcl 8.5 will be the minimum supported.
12
-
13
7
Categories
14
8
^^^^^^^^^^
15
9
@@ -20,6 +14,12 @@ along with the related ``Image.NORMAL``, ``Image.SEQUENCE`` and
20
14
To determine if an image has multiple frames or not,
21
15
``getattr(im, "is_animated", False) `` can be used instead.
22
16
17
+ Tk/Tcl 8.4
18
+ ^^^^^^^^^^
19
+
20
+ Support for Tk/Tcl 8.4 is deprecated and will be removed in Pillow 10.0.0 (2023-01-02),
21
+ when Tk/Tcl 8.5 will be the minimum supported.
22
+
23
23
API Changes
24
24
===========
25
25
@@ -56,6 +56,20 @@ can be used.
56
56
API Additions
57
57
=============
58
58
59
+ getxmp() for JPEG images
60
+ ^^^^^^^^^^^^^^^^^^^^^^^^
61
+
62
+ A new method has been added to return
63
+ `XMP data <https://en.wikipedia.org/wiki/Extensible_Metadata_Platform >`_ for JPEG
64
+ images. It reads the XML data into a dictionary of names and values.
65
+
66
+ For example::
67
+
68
+ >>> from PIL import Image
69
+ >>> with Image.open("Tests/images/xmp_test.jpg") as im:
70
+ >>> print(im.getxmp())
71
+ {'RDF': {}, 'Description': {'Version': '10.4', 'ProcessVersion': '10.0', ...}, ...}
72
+
59
73
ImageDraw.rounded_rectangle
60
74
^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
75
@@ -71,17 +85,13 @@ create a circle, but not any other ellipse.
71
85
draw = ImageDraw.Draw(im)
72
86
draw.rounded_rectangle(xy = (10 , 20 , 190 , 180 ), radius = 30 , fill = " red" )
73
87
74
- ImageShow.IPythonViewer
75
- ^^^^^^^^^^^^^^^^^^^^^^^
76
-
77
- If IPython is present, this new :py:class: `PIL.ImageShow.Viewer ` subclass will be
78
- registered. It displays images on all IPython frontends. This will be helpful
79
- to users of Google Colab, allowing ``im.show() `` to display images.
88
+ ImageOps.autocontrast: preserve_tone
89
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
90
81
- It is lower in priority than the other default :py:class: ` PIL.ImageShow.Viewer `
82
- instances, so it will only be used by `` im.show() `` or :py:func: ` .ImageShow.show() `
83
- if none of the other viewers are available. This means that the behaviour of
84
- :py:class: ` PIL.ImageShow ` will stay the same for most Pillow users .
91
+ The default behaviour of :py:meth: ` ~ PIL.ImageOps.autocontrast ` is to normalize
92
+ separate histograms for each color channel, changing the tone of the image. The new
93
+ `` preserve_tone `` argument keeps the tone unchanged by using one luminance histogram
94
+ for all channels .
85
95
86
96
ImageShow.GmDisplayViewer
87
97
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -95,6 +105,18 @@ counterpart. Thus, if both ImageMagick and GraphicsMagick are installed,
95
105
ImageMagick, i.e the behaviour stays the same for Pillow users having
96
106
ImageMagick installed.
97
107
108
+ ImageShow.IPythonViewer
109
+ ^^^^^^^^^^^^^^^^^^^^^^^
110
+
111
+ If IPython is present, this new :py:class: `PIL.ImageShow.Viewer ` subclass will be
112
+ registered. It displays images on all IPython frontends. This will be helpful
113
+ to users of Google Colab, allowing ``im.show() `` to display images.
114
+
115
+ It is lower in priority than the other default :py:class: `PIL.ImageShow.Viewer `
116
+ instances, so it will only be used by ``im.show() `` or :py:func: `.ImageShow.show() `
117
+ if none of the other viewers are available. This means that the behaviour of
118
+ :py:class: `PIL.ImageShow ` will stay the same for most Pillow users.
119
+
98
120
Saving TIFF with ICC profile
99
121
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100
122
@@ -104,28 +126,6 @@ be specified through a keyword argument::
104
126
im.save("out.tif", icc_profile=...)
105
127
106
128
107
- ImageOps.autocontrast: preserve_tone
108
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109
-
110
- The default behaviour of :py:meth: `~PIL.ImageOps.autocontrast ` is to normalize
111
- separate histograms for each color channel, changing the tone of the image. The new
112
- ``preserve_tone `` argument keeps the tone unchanged by using one luminance histogram
113
- for all channels.
114
-
115
- getxmp() for JPEG images
116
- ^^^^^^^^^^^^^^^^^^^^^^^^
117
-
118
- A new method has been added to return
119
- `XMP data <https://en.wikipedia.org/wiki/Extensible_Metadata_Platform >`_ for JPEG
120
- images. It reads the XML data into a dictionary of names and values.
121
-
122
- For example::
123
-
124
- >>> from PIL import Image
125
- >>> with Image.open("Tests/images/xmp_test.jpg") as im:
126
- >>> print(im.getxmp())
127
- {'RDF': {}, 'Description': {'Version': '10.4', 'ProcessVersion': '10.0', ...}, ...}
128
-
129
129
Security
130
130
========
131
131
@@ -195,6 +195,12 @@ The pixel data is encoded using the format specified in the `CompuServe GIF stan
195
195
The older encoder used a variant of run-length encoding that was compatible but less
196
196
efficient.
197
197
198
+ GraphicsMagick
199
+ ^^^^^^^^^^^^^^
200
+
201
+ The test suite can now be run on systems which have GraphicsMagick _ but not
202
+ ImageMagick _ installed. If both are installed, the tests prefer ImageMagick.
203
+
198
204
Libraqm and FriBiDi linking
199
205
^^^^^^^^^^^^^^^^^^^^^^^^^^^
200
206
@@ -219,12 +225,6 @@ PyQt6
219
225
Support has been added for PyQt6. If it is installed, it will be used instead of
220
226
PySide6, PyQt5 or PySide2.
221
227
222
- GraphicsMagick
223
- ^^^^^^^^^^^^^^
224
-
225
- The test suite can now be run on systems which have GraphicsMagick _ but not
226
- ImageMagick _ installed. If both are installed, the tests prefer ImageMagick.
227
-
228
228
.. _GraphicsMagick : http://www.graphicsmagick.org/
229
229
.. _ImageMagick : https://imagemagick.org/
230
230
.. _OSS-Fuzz : https://github.com/google/oss-fuzz
0 commit comments