what is imghdr module in python?
The imghdr module determines the type of image contained in a file or byte stream. The imghdr module defines the following function: imghdr. ... Each function takes two arguments: the byte-stream and an open file-like object. When what() is called with a byte-stream, the file-like object will be None.