44Deprecations
55============
66
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-
137Categories
148^^^^^^^^^^
159
@@ -20,6 +14,12 @@ along with the related ``Image.NORMAL``, ``Image.SEQUENCE`` and
2014To determine if an image has multiple frames or not,
2115``getattr(im, "is_animated", False) `` can be used instead.
2216
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+
2323API Changes
2424===========
2525
@@ -56,6 +56,20 @@ can be used.
5656API Additions
5757=============
5858
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+
5973ImageDraw.rounded_rectangle
6074^^^^^^^^^^^^^^^^^^^^^^^^^^^
6175
@@ -71,17 +85,13 @@ create a circle, but not any other ellipse.
7185 draw = ImageDraw.Draw(im)
7286 draw.rounded_rectangle(xy = (10 , 20 , 190 , 180 ), radius = 30 , fill = " red" )
7387
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+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8090
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 .
8595
8696ImageShow.GmDisplayViewer
8797^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -95,6 +105,18 @@ counterpart. Thus, if both ImageMagick and GraphicsMagick are installed,
95105ImageMagick, i.e the behaviour stays the same for Pillow users having
96106ImageMagick installed.
97107
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+
98120Saving TIFF with ICC profile
99121^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100122
@@ -104,28 +126,6 @@ be specified through a keyword argument::
104126 im.save("out.tif", icc_profile=...)
105127
106128
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-
129129Security
130130========
131131
@@ -195,6 +195,12 @@ The pixel data is encoded using the format specified in the `CompuServe GIF stan
195195The older encoder used a variant of run-length encoding that was compatible but less
196196efficient.
197197
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+
198204Libraqm and FriBiDi linking
199205^^^^^^^^^^^^^^^^^^^^^^^^^^^
200206
@@ -219,12 +225,6 @@ PyQt6
219225Support has been added for PyQt6. If it is installed, it will be used instead of
220226PySide6, PyQt5 or PySide2.
221227
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-
228228.. _GraphicsMagick : http://www.graphicsmagick.org/
229229.. _ImageMagick : https://imagemagick.org/
230230.. _OSS-Fuzz : https://github.com/google/oss-fuzz
0 commit comments