From 4dc195333e537515817b40c65b3ad643acda7d1e Mon Sep 17 00:00:00 2001 From: gofr <32750931+gofr@users.noreply.github.com> Date: Sat, 17 Oct 2020 20:45:54 +0200 Subject: [PATCH] fixup! De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables --- src/PIL/JpegImagePlugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PIL/JpegImagePlugin.py b/src/PIL/JpegImagePlugin.py index 3ff22b0f4..82b4954d1 100644 --- a/src/PIL/JpegImagePlugin.py +++ b/src/PIL/JpegImagePlugin.py @@ -588,7 +588,8 @@ def convert_dict_qtables(qtables): warnings.warn( "convert_dict_qtables is deprecated and will be removed in a future" " release. Conversion is no longer needed.", - DeprecationWarning) + DeprecationWarning, + ) return qtables @@ -670,7 +671,8 @@ def _save(im, fp, filename): if isinstance(qtables, (tuple, list, dict)): if isinstance(qtables, dict): 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): qtables = list(qtables) if not (0 < len(qtables) < 5):