From 01d71be3fa35d002e259f0b8438d37543d0fc91a Mon Sep 17 00:00:00 2001 From: jlwoolf Date: Tue, 27 Sep 2022 09:08:56 -0600 Subject: [PATCH] bitmaps should be transparent if 32bits --- src/PIL/BmpImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/BmpImagePlugin.py b/src/PIL/BmpImagePlugin.py index 1041ab763..bc81f3274 100644 --- a/src/PIL/BmpImagePlugin.py +++ b/src/PIL/BmpImagePlugin.py @@ -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"