Discuss / Python / 作业

作业

Topic source

阿萌QVQ

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

def bmp_info(data): t = struct.unpack('<ccIIIIIIHH', data[:30]) if t[0] == b'B' and (t[1]==b'A' or t[1]==b'M'): return { 'width': t[6], 'height': t[7], 'color': t[9] } else: print('not bmp')


  • 1

Reply