From 1a5e1893ed845a107ad465cd09d15dbfd6fac17a Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 7 Aug 2017 11:14:32 -0500 Subject: [PATCH] Calibre image processing chokes on SVG images. --- fanficfare/story.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fanficfare/story.py b/fanficfare/story.py index eea796b2..6fcca4bf 100644 --- a/fanficfare/story.py +++ b/fanficfare/story.py @@ -57,6 +57,9 @@ try: def convert_image(url,data,sizes,grayscale, removetrans,imgtype="jpg",background='#ffffff'): + + if url.lower().endswith('.svg'): + raise exceptions.RejectImage("Calibre image processing chokes on SVG images.") export = False img = Image() img.load(data)