Discuss / Python / 交作业

交作业

Topic source

def bmp_info(data): s = struct.unpack('<ccIIIIIIHH', data[:30]) if s[1] == b'M': return { 'width': s[-4], 'height': s[-3], 'color': s[-1] } else: print('不是bmp文件')


  • 1

Reply