Open dkg opened 1 year ago
Any chance this could get merged in the near future?
@Commod0re would you please merge this PR and ship a new release to PyPI?
I've confirmed that the implementation here matches test_jpeg()
in /usr/lib64/python3.11/imghdr.py
. Also, I tested this conditional on a random JPG image and imagebytes[6:10]
is indeed b'JFIF'
.
imghdr is deprecated and will be removed in python 3.13 (see https://peps.python.org/pep-0594/#imghdr)
The relevant code in imghdr is just:
So we transplant it directly