mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-23 11:34:14 +03:00
bitmaps should be transparent if 32bits
This commit is contained in:
parent
0c1ff743b6
commit
01d71be3fa
|
@ -209,7 +209,7 @@ class BmpImageFile(ImageFile.ImageFile):
|
||||||
else:
|
else:
|
||||||
raise OSError("Unsupported BMP bitfields layout")
|
raise OSError("Unsupported BMP bitfields layout")
|
||||||
elif file_info["compression"] == self.RAW:
|
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"
|
raw_mode, self.mode = "BGRA", "RGBA"
|
||||||
elif file_info["compression"] == self.RLE8:
|
elif file_info["compression"] == self.RLE8:
|
||||||
decoder_name = "bmp_rle"
|
decoder_name = "bmp_rle"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user