mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 13:14:27 +03:00
fixup! De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables
This commit is contained in:
parent
9980981c2e
commit
4dc195333e
|
@ -588,7 +588,8 @@ def convert_dict_qtables(qtables):
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"convert_dict_qtables is deprecated and will be removed in a future"
|
"convert_dict_qtables is deprecated and will be removed in a future"
|
||||||
" release. Conversion is no longer needed.",
|
" release. Conversion is no longer needed.",
|
||||||
DeprecationWarning)
|
DeprecationWarning,
|
||||||
|
)
|
||||||
return qtables
|
return qtables
|
||||||
|
|
||||||
|
|
||||||
|
@ -670,7 +671,8 @@ def _save(im, fp, filename):
|
||||||
if isinstance(qtables, (tuple, list, dict)):
|
if isinstance(qtables, (tuple, list, dict)):
|
||||||
if isinstance(qtables, dict):
|
if isinstance(qtables, dict):
|
||||||
qtables = [
|
qtables = [
|
||||||
qtables[key] for key in range(len(qtables)) if key in qtables]
|
qtables[key] for key in range(len(qtables)) if key in qtables
|
||||||
|
]
|
||||||
elif isinstance(qtables, tuple):
|
elif isinstance(qtables, tuple):
|
||||||
qtables = list(qtables)
|
qtables = list(qtables)
|
||||||
if not (0 < len(qtables) < 5):
|
if not (0 < len(qtables) < 5):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user