def bmp_info(data): result = struct.unpack('<ccIIIIIIHH',data[:30]) if result[0]==b'B' and result[1]==b'M': return { 'width': result[6], 'height': result[7], 'color': result[9] } return None
Sign in to make a reply
艾文SEO
def bmp_info(data): result = struct.unpack('<ccIIIIIIHH',data[:30]) if result[0]==b'B' and result[1]==b'M': return { 'width': result[6], 'height': result[7], 'color': result[9] } return None