Discuss / Python / 打卡

打卡

Topic source

°Destiny

#1 Created at ... [Delete] [Delete and Lock User]
def bmp_info(data):
    s=struct.unpack('<ccIIIIIIHH', data[:30])
    if s[0]==b'B' and s[1]==b'M':
        return {
            'width': s[6],
            'height': s[7],
            'color': s[9]
        }

  • 1

Reply