ASVL_PAF_RGB24_B8G8R8个人感觉就是bmp格式
oldimg = Image.open(filePath)
# BMP 4 byte align
newWidth = oldimg.width& 0xFFFFFFFC
newHeight = oldimg.height& 0xFFFFFFFE
if(newWidth != oldimg.width) or (newHeight != oldimg.height):
crop_area = (0, 0, newWidth, newHeight)
img = oldimg.crop(crop_area)
else:
img = oldimg
BMP_bytes = io.BytesIO()
img.transpose(Image.FLIP