Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/api/next_api_changes/deprecations/31468-ES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
``image.thumbnail``
~~~~~~~~~~~~~~~~~~~

... is deprecated without replacement. Use :external:py:`Pillow's thumbnail
method <PIL.Image.Image.thumbnail>` instead. See also the `Pillow tutorial
<https://pillow.readthedocs.io/en/stable/handbook/tutorial.html#create-jpeg-thumbnails>`_.
32 changes: 0 additions & 32 deletions galleries/examples/misc/image_thumbnail_sgskip.py

This file was deleted.

4 changes: 3 additions & 1 deletion lib/matplotlib/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1787,12 +1787,14 @@ def _pil_png_to_float_array(pil_png):
raise ValueError(f"Unknown PIL rawmode: {rawmode}")


@_api.deprecated('3.11', alternative="Pillow's `PIL.Image.Image.thumbnail`")
def thumbnail(infile, thumbfile, scale=0.1, interpolation='bilinear',
preview=False):
"""
Make a thumbnail of image in *infile* with output filename *thumbfile*.

See :doc:`/gallery/misc/image_thumbnail_sgskip`.
See `Pillow for a replacement
<https://pillow.readthedocs.io/en/stable/handbook/tutorial.html#create-jpeg-thumbnails>`_.

Parameters
----------
Expand Down
Loading