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