diff --git a/bob/io/image/__init__.py b/bob/io/image/__init__.py index b46400a6666a15590f8fad9e956afe62e5883723..4081dc29e1b42c72793615681ea5150b0dae4021 100644 --- a/bob/io/image/__init__.py +++ b/bob/io/image/__init__.py @@ -20,8 +20,8 @@ def get_config(): # fix imghdr's jpeg detection to use the first two bytes (according to https://en.wikipedia.org/wiki/List_of_file_signatures) import imghdr def _test_jpeg(h, f): - if h.startswith('\xff\xd8'): - return "jpeg" + if h.startswith('\xff\xd8'): + return "jpeg" imghdr.tests.append(_test_jpeg) def load(filename, extension=None): @@ -56,7 +56,7 @@ def load(filename, extension=None): if extension == 'auto': extension = imghdr.what(filename) if extension is None: - raise IOError("Could not detect the image type of file %s" % filename) + raise IOError("Could not detect the image type of file %s" % filename) extension = "." + extension f = bob.io.base.File(filename, 'r', extension)