import struct def bmp_check(filename): f = open(filename,'rb') s = f.read(30) t = struct.unpack('<ccIIIIIIHH',s) if t[0]==b'B' and t[1]==b'M': return t[6],'*',t[7]),' ', str(t[9]) else: return "It's not a bmp file!"
Sign in to make a reply
渔夫先生的面包房