From 0ff526b5ca4c8ea92a12b004be938b9e36c1bc4c Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 16 Dec 2019 21:57:55 +1000 Subject: [PATCH] fixed a potential endless loop if the image had a lot of metadata --- bcao.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bcao.py b/bcao.py index debe218..abcaeac 100755 --- a/bcao.py +++ b/bcao.py @@ -105,7 +105,7 @@ if cover == "": while os.path.getsize(cover) / 1024 > args.threshold: if os.path.basename(cover) != "cover-lq.jpg": nucover = os.path.dirname(cover) + os.sep + "cover-lq.jpg" - subprocess.check_output(["convert", cover, "-quality", "85", nucover]) #convert the file to a jpeg + subprocess.check_output(["convert", cover, "-quality", "85", "-strip", nucover]) #convert the file to a jpeg cover = nucover else: subprocess.check_output(["convert", cover, "-resize", "90%", cover]) #shrink it slightly