编辑器
import imghdr png_header = b"\x89PNG\r\n\x1a\n" + b"0"*24 print(imghdr.what(None, png_header))
png
DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13