bitmaps should be transparent if 32bits

This commit is contained in:
jlwoolf 2022-09-27 09:08:56 -06:00
parent 0c1ff743b6
commit 01d71be3fa

View File

@ -209,7 +209,7 @@ class BmpImageFile(ImageFile.ImageFile):
else:
raise OSError("Unsupported BMP bitfields layout")
elif file_info["compression"] == self.RAW:
if file_info["bits"] == 32 and header == 22: # 32-bit .cur offset
if file_info["bits"] == 32: # 32-bit has transparency
raw_mode, self.mode = "BGRA", "RGBA"
elif file_info["compression"] == self.RLE8:
decoder_name = "bmp_rle"