def check_bmp(filename): with open(filename,"rb") as f: t = struct.unpack('<ccIIIIIIHH',s) if (t[0] == b'B' and t[1] == b'M'): print("Size:",t[2],",Colors:",t[-1]) check_bmp("C://Users//lxw//Desktop//test.bmp")
Sign in to make a reply
丨NikoBelic丨