Discuss / Python / 作业

作业

Topic source

def bmp_info(bmp_data): result = struct.unpack('<ccIIIIIIHH', bmp_data[:30]) if result[0] + result[1] in (b'BM', b'BA'): return { 'width': result[-4], 'height': result[-3], 'color': result[-1] } else: return False


  • 1

Reply