use LZW compression for output

This commit is contained in:
Patrick Jentsch 2020-04-06 11:06:57 +02:00
parent 053366aa09
commit 8aa9554339

View File

@ -32,7 +32,7 @@ def merge_images(input_dir, output_dir, output_file_base, zip):
pass
cmd = 'ls -Q -v "{i}"/*.* > "{i}"/file_list.txt'.format(i=input_dir)
subprocess.run(cmd, shell=True)
cmd = 'convert @"{}"/file_list.txt "{}"/"{}".pdf'.format(input_dir, output_dir, output_file_base) # noqa
cmd = 'convert @"{}"/file_list.txt -compress LZW "{}"/"{}".pdf'.format(input_dir, output_dir, output_file_base) # noqa
subprocess.run(cmd, shell=True)
cmd = 'rm "{}"/file_list.txt'.format(input_dir)
subprocess.run(cmd, shell=True)
@ -53,7 +53,6 @@ def merge_images(input_dir, output_dir, output_file_base, zip):
def main():
args = parse_arguments()
print(args)
merge_images(args.i, args.o, args.f, args.zip)