所见不为真--图片格式文件检测python

import imghdr

imghdr.what('d:/faker.jpg')

>png

使用imghdr模块进行图片格式检测

猜你喜欢

转载自blog.51cto.com/13522822/2104311