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