From c2278d244257d5a8c55812a0622a86f2261d7932 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 13 Jun 2013 08:04:35 +0530 Subject: [PATCH] Fix too small images being identified as cover in DOCX files --- src/calibre/ebooks/metadata/docx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/docx.py b/src/calibre/ebooks/metadata/docx.py index 31b0c48974..ea34d27d3a 100644 --- a/src/calibre/ebooks/metadata/docx.py +++ b/src/calibre/ebooks/metadata/docx.py @@ -27,7 +27,7 @@ def get_metadata(stream): width, height, fmt = identify_data(raw) except: continue - if 0.8 <= height/width <= 1.8 and height*width >= 12000: + if 0.8 <= height/width <= 1.8 and height*width >= 160000: cdata = (fmt, raw) if cdata is not None: mi.cover_data = cdata