I want to determine if a buffer I have (downloaded it) is an image file, without saving it to the disk. I looked it up and found out that:
- imghdr can do it only for files.
- python-magic can give me the file type, but than I need to map it to image types.
Is there a better way?