Discuss / Python / 作业

作业

Topic source

Junhong1994

#1 Created at ... [Delete] [Delete and Lock User]

learning.py又能用了呀

def bmp_info(data):
    info = struct.unpack('<ccIIIIIIHH',data[:30])
    return {
        'width': info[6],
        'height': info[7],
        'color': info[9]
    }

Junhong1994

#2 Created at ... [Delete] [Delete and Lock User]
def bmp_info(data):
    info = struct.unpack('<IIHH',data[18:30])
    return {
        'width': info[0],
        'height': info[1],
        'color': info[3]
    }

  • 1

Reply