Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mozillazg/image-mime
根据图片内容判断 MIME 类型
https://github.com/mozillazg/image-mime
Last synced: 22 days ago
JSON representation
根据图片内容判断 MIME 类型
- Host: GitHub
- URL: https://github.com/mozillazg/image-mime
- Owner: mozillazg
- Created: 2012-10-11T05:39:49.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-15T00:56:12.000Z (about 12 years ago)
- Last Synced: 2024-10-03T15:42:12.574Z (3 months ago)
- Language: Python
- Homepage:
- Size: 113 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.markdown
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