Discuss / Python / 作业。注意buffer对应: data[:30]

作业。注意buffer对应: data[:30]

Topic source

小羊飞的

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

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


  • 1

Reply