You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If just looking for the JPEG type, maybe a simple fix to get rid of imghdr would be to look at the signature in the first few bytes of the image data like:
...
# Check for JPEG signature (first three bytes are b'\xFF\xD8\xFF')ifimagebytes.startswith(b'\xFF\xD8\xFF'):
returnImageEncoding.JPEGreturnImageEncoding.Unknown
?
The text was updated successfully, but these errors were encountered:
The
imghdr
module is deprecated in Python 3.11 (see here) and slated for removal in Python 3.13.imghdr
is used to determine image type:PGPy/pgpy/constants.py
Lines 430 to 435 in 30a7571
If just looking for the JPEG type, maybe a simple fix to get rid of
imghdr
would be to look at the signature in the first few bytes of the image data like:?
The text was updated successfully, but these errors were encountered: