Removed alpha property

This commit is contained in:
Andrew Murray 2025-05-10 19:53:24 +10:00
parent 54c3c93987
commit 60c89cb9e9
3 changed files with 1 additions and 5 deletions

View File

@ -69,8 +69,6 @@ def _save_frame(im: Image.Image, fp: BytesIO, info: dict[str, Any]) -> None:
image_io,
[ImageFile._Tile("raw", (0, 0) + size, 0, ("1", 0, -1))],
)
else:
frame.alpha = True
frame.save(image_io, "dib")
else:

View File

@ -244,7 +244,7 @@ class BmpImageFile(ImageFile.ImageFile):
msg = "Unsupported BMP bitfields layout"
raise OSError(msg)
elif file_info["compression"] == self.COMPRESSIONS["RAW"]:
if file_info["bits"] == 32 and (USE_RAW_ALPHA or hasattr(self, "alpha")):
if file_info["bits"] == 32 and USE_RAW_ALPHA:
raw_mode, self._mode = "BGRA", "RGBA"
elif file_info["compression"] in (
self.COMPRESSIONS["RLE8"],

View File

@ -87,8 +87,6 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
image_io,
[ImageFile._Tile("raw", (0, 0) + size, 0, ("1", 0, -1))],
)
else:
frame.alpha = True
frame.save(image_io, "dib")
else: