Fix too small images being identified as cover in DOCX files

This commit is contained in:
Kovid Goyal 2013-06-13 08:04:35 +05:30
parent 395f21054b
commit c2278d2442

View File

@ -27,7 +27,7 @@ def get_metadata(stream):
width, height, fmt = identify_data(raw) width, height, fmt = identify_data(raw)
except: except:
continue 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) cdata = (fmt, raw)
if cdata is not None: if cdata is not None:
mi.cover_data = cdata mi.cover_data = cdata