diff -r d3cb8720f17e Lib/imghdr.py --- a/Lib/imghdr.py Tue Nov 20 16:13:54 2012 +0200 +++ b/Lib/imghdr.py Tue Nov 20 18:12:40 2012 +0100 @@ -35,8 +35,9 @@ tests = [] def test_jpeg(h, f): - """JPEG data in JFIF or Exif format""" - if h[6:10] in (b'JFIF', b'Exif'): + """JPEG data in JFIF or Exif format. Supports an ICC profile if it's present""" + if h[6:10] in (b'JFIF', b'Exif') or + (h[2:4] == b'\xFF\xE2' and h[6:17] == b'ICC_PROFILE'): return 'jpeg' tests.append(test_jpeg)