Discuss / Python / 作业(好困)

作业(好困)

Topic source

一度剑心

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

def bmp_info(data):

    a=struct.unpack('<ccIIIIIIHH', data[0:30])

    if a[0:2]==(b'B',b'M'):

      return {

        'width': a[6],

        'height': a[7],

        'color': a[9]

      }


  • 1

Reply