Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mozillazg/image-mime

根据图片内容判断 MIME 类型
https://github.com/mozillazg/image-mime

Last synced: 22 days ago
JSON representation

根据图片内容判断 MIME 类型

Awesome Lists containing this project

README

        

# 根据图片内容判断 MIME 类型

## 支持如下 MIME 类型:

* image/gif
* image/jpeg
* image/tiff
* image/png
* image/bmp
* image/x-icon
* application/octet-stream

## 示例

>>> with open('test', 'rb') as f:
... print get_image_mime(f.read())
...
image/png