From 50d76e7f6c063bed71b88c45a9f3cbf863a64446 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 7 Feb 2022 22:18:20 -0800 Subject: [PATCH] optimize: remove comment about issue in Pillow that is now fixed --- src/ocrmypdf/optimize.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ocrmypdf/optimize.py b/src/ocrmypdf/optimize.py index a240dd6b..46de7354 100644 --- a/src/ocrmypdf/optimize.py +++ b/src/ocrmypdf/optimize.py @@ -397,10 +397,6 @@ def convert_to_jbig2( def _optimize_jpeg(args: Tuple[Xref, Path, Path, int]) -> Tuple[Xref, Optional[Path]]: xref, in_jpg, opt_jpg, jpeg_quality = args - # This may produce a debug warning from PIL - # DEBUG:PIL.Image:Error closing: 'NoneType' object has no attribute - # 'close'. Seems to be mostly harmless - # https://github.com/python-pillow/Pillow/issues/1144 with Image.open(in_jpg) as im: im.save(opt_jpg, optimize=True, quality=jpeg_quality)