Expand size growth reasons to other arguments that trigger transcoding

This commit is contained in:
James R. Barlow
2018-04-27 19:34:57 -07:00
parent 2131ad4670
commit 383e726d65
+14 -2
View File
@@ -787,8 +787,20 @@ def report_output_file_size(options, _log, input_file, output_file):
reasons = []
if not fitz:
reasons.append("The optional dependency PyMuPDF is not installed.")
if options.force_ocr:
reasons.append("The argument --force-ocr was issued.")
image_preproc = {
'deskew',
'clean_final',
'remove_background',
'oversample',
'force_ocr'
}
for arg in image_preproc:
attr = getattr(options, arg, None)
if not attr:
continue
reasons.append(
"The argument --{} was issued, causing transcoding.".format(
arg.replace('_', '-')))
if reasons:
explanation = (