[issue16512] imghdr doesn't support jpegs with an ICC profile

2012-11-20 Thread Joril
New submission from Joril: imghdr doesn't support jpegs that include an ICC Profile. This is because imghdr looks for "JFIF" somewhere at the beginning of the file, but the ICC_PROFILE shifts that further. (The ICC spec is here http://www.color.org/specification/ICC1v43_2010-1

[issue16512] imghdr doesn't support jpegs with an ICC profile

2012-11-20 Thread Joril
Joril added the comment: I can try, yes. I'll add one ASAP -- versions: +Python 2.7 -Python 3.4 ___ Python tracker <http://bugs.python.org/issue16512> ___ ___

[issue16512] imghdr doesn't support jpegs with an ICC profile

2012-11-20 Thread Joril
Joril added the comment: Here it is... It is against the latest hg version, should I write one for 2.7 too? -- keywords: +patch Added file: http://bugs.python.org/file28054/imghdr_icc_jpeg.patch ___ Python tracker <http://bugs.python.org/issue16

[issue16512] imghdr doesn't support jpegs with an ICC profile

2012-11-21 Thread Joril
Joril added the comment: It looks like the test just walks a directory recursively while trying to identify its files, there's no "classic" test of the "this is a JPEG, is it detected correctly"-type -- ___ Python tracker