Discuss / Python / work 2333

work 2333

Topic source

Phioton

#1 Created at ... [Delete] [Delete and Lock User]
import base64, struct

def bmp_info(data):
    bmp_unpack=struct.unpack('<ccIIIIIIHH', bmp_data[0:30])
    if bmp_unpack[0:2] == (b'B',b'M'):
        return {
        'width': bmp_unpack[-4] ,
        'height': bmp_unpack[-3],
        'color': bmp_unpack[-1]
        }

  • 1

Reply