[issue21574] Port image types detections from PIL to the imghdr module

Andriy Sokolovskiy report at bugs.python.org
Thu Oct 2 22:32:05 CEST 2014


Andriy Sokolovskiy added the comment:

Hi! Here is first version of patch. What I've done:
* Ported 10 new image formats from PIL (tests included)
* Improved existing file detections like PIL does.
* Add some byte manipulation routines

One more thing - I removed `ord()` calls, because python3 expects unicode symbol,
but bytes was provided, and I'm not sure is that right. Will these changes be included to python 3.5 only?

Here are some other image formats in PIL, that I didn't port, because they are so excotic, that I didn't find
even file examples. I can do this blindly, but I think without tests files this is useless.
What community think about this?

----------
keywords: +patch
Added file: http://bugs.python.org/file36785/issue21574.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21574>
_______________________________________


More information about the Python-bugs-list mailing list