diff --git a/src/calibre/utils/imghdr.py b/src/calibre/utils/imghdr.py index 0179ad5bbc..54ec8209a5 100644 --- a/src/calibre/utils/imghdr.py +++ b/src/calibre/utils/imghdr.py @@ -10,10 +10,10 @@ def what(file, h=None): if h is None: if isinstance(file, basestring): f = open(file, 'rb') - h = f.read(44) + h = f.read(150) else: location = file.tell() - h = file.read(44) + h = file.read(150) file.seek(location) f = None else: @@ -132,6 +132,12 @@ def test_emf(h, f): tests.append(test_emf) +def test_svg(h, f): + if (h[:2] == b'