mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 10:16:17 +03:00
Remove JpegImagePlugin.convert_dict_qtables, deprecated in 8.3.0
This commit is contained in:
parent
ddc4e90235
commit
52f4fc59a2
|
@ -636,12 +636,6 @@ class TestFileJpeg:
|
||||||
assert max(im2.quantization[0]) <= 255
|
assert max(im2.quantization[0]) <= 255
|
||||||
assert max(im2.quantization[1]) <= 255
|
assert max(im2.quantization[1]) <= 255
|
||||||
|
|
||||||
def test_convert_dict_qtables_deprecation(self):
|
|
||||||
with pytest.warns(DeprecationWarning):
|
|
||||||
qtable = {0: [1, 2, 3, 4]}
|
|
||||||
qtable2 = JpegImagePlugin.convert_dict_qtables(qtable)
|
|
||||||
assert qtable == qtable2
|
|
||||||
|
|
||||||
@pytest.mark.skipif(not djpeg_available(), reason="djpeg not available")
|
@pytest.mark.skipif(not djpeg_available(), reason="djpeg not available")
|
||||||
def test_load_djpeg(self):
|
def test_load_djpeg(self):
|
||||||
with Image.open(TEST_FILE) as img:
|
with Image.open(TEST_FILE) as img:
|
||||||
|
|
|
@ -12,16 +12,6 @@ Deprecated features
|
||||||
Below are features which are considered deprecated. Where appropriate,
|
Below are features which are considered deprecated. Where appropriate,
|
||||||
a ``DeprecationWarning`` is issued.
|
a ``DeprecationWarning`` is issued.
|
||||||
|
|
||||||
JpegImagePlugin.convert_dict_qtables
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
.. deprecated:: 8.3.0
|
|
||||||
|
|
||||||
JPEG ``quantization`` is now automatically converted, but still returned as a
|
|
||||||
dictionary. The :py:attr:`~PIL.JpegImagePlugin.convert_dict_qtables` method no longer
|
|
||||||
performs any operations on the data given to it, has been deprecated and will be
|
|
||||||
removed in Pillow 10.0.0 (2023-07-01).
|
|
||||||
|
|
||||||
ImagePalette size parameter
|
ImagePalette size parameter
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -210,6 +200,15 @@ Categories
|
||||||
To determine if an image has multiple frames or not,
|
To determine if an image has multiple frames or not,
|
||||||
``getattr(im, "is_animated", False)`` can be used instead.
|
``getattr(im, "is_animated", False)`` can be used instead.
|
||||||
|
|
||||||
|
JpegImagePlugin.convert_dict_qtables
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. deprecated:: 8.3.0
|
||||||
|
.. versionremoved:: 10.0.0
|
||||||
|
|
||||||
|
Since deprecation in Pillow 8.3.0, the ``convert_dict_qtables`` method no longer
|
||||||
|
performed any operations on the data given to it, and has been removed.
|
||||||
|
|
||||||
PyQt5 and PySide2
|
PyQt5 and PySide2
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ JpegImagePlugin.convert_dict_qtables
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
JPEG ``quantization`` is now automatically converted, but still returned as a
|
JPEG ``quantization`` is now automatically converted, but still returned as a
|
||||||
dictionary. The :py:attr:`~PIL.JpegImagePlugin.convert_dict_qtables` method no longer
|
dictionary. The ``convert_dict_qtables`` method no longer
|
||||||
performs any operations on the data given to it, has been deprecated and will be
|
performs any operations on the data given to it, has been deprecated and will be
|
||||||
removed in Pillow 10.0.0 (2023-07-01).
|
removed in Pillow 10.0.0 (2023-07-01).
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ from ._binary import i16be as i16
|
||||||
from ._binary import i32be as i32
|
from ._binary import i32be as i32
|
||||||
from ._binary import o8
|
from ._binary import o8
|
||||||
from ._binary import o16be as o16
|
from ._binary import o16be as o16
|
||||||
from ._deprecate import deprecate
|
|
||||||
from .JpegPresets import presets
|
from .JpegPresets import presets
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -612,11 +611,6 @@ samplings = {
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
||||||
|
|
||||||
def convert_dict_qtables(qtables):
|
|
||||||
deprecate("convert_dict_qtables", 10, action="Conversion is no longer needed")
|
|
||||||
return qtables
|
|
||||||
|
|
||||||
|
|
||||||
def get_sampling(im):
|
def get_sampling(im):
|
||||||
# There's no subsampling when images have only 1 layer
|
# There's no subsampling when images have only 1 layer
|
||||||
# (grayscale images) or when they are CMYK (4 layers),
|
# (grayscale images) or when they are CMYK (4 layers),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user