Discuss / Python / 我来交作业咯

我来交作业咯

Topic source

ColinShi2011

#1 Created at ... [Delete] [Delete and Lock User]

import struct def bmpinfo(file): with open(file,'rb') as f: b=f.read(30) i=struct.unpack('<ccIIIIIIHH',b) if i[1]==b'M': os='windwos' else: os='OS/2' print('该文件是由%s系统创建,为分辨率%s * %s %s位图片' % (os,i[6],i[7],i[9]))


  • 1

Reply