mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-11 08:42:35 +03:00
Removed alpha property
This commit is contained in:
parent
54c3c93987
commit
60c89cb9e9
|
@ -69,8 +69,6 @@ def _save_frame(im: Image.Image, fp: BytesIO, info: dict[str, Any]) -> None:
|
||||||
image_io,
|
image_io,
|
||||||
[ImageFile._Tile("raw", (0, 0) + size, 0, ("1", 0, -1))],
|
[ImageFile._Tile("raw", (0, 0) + size, 0, ("1", 0, -1))],
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
frame.alpha = True
|
|
||||||
|
|
||||||
frame.save(image_io, "dib")
|
frame.save(image_io, "dib")
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -244,7 +244,7 @@ class BmpImageFile(ImageFile.ImageFile):
|
||||||
msg = "Unsupported BMP bitfields layout"
|
msg = "Unsupported BMP bitfields layout"
|
||||||
raise OSError(msg)
|
raise OSError(msg)
|
||||||
elif file_info["compression"] == self.COMPRESSIONS["RAW"]:
|
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"
|
raw_mode, self._mode = "BGRA", "RGBA"
|
||||||
elif file_info["compression"] in (
|
elif file_info["compression"] in (
|
||||||
self.COMPRESSIONS["RLE8"],
|
self.COMPRESSIONS["RLE8"],
|
||||||
|
|
|
@ -87,8 +87,6 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
|
||||||
image_io,
|
image_io,
|
||||||
[ImageFile._Tile("raw", (0, 0) + size, 0, ("1", 0, -1))],
|
[ImageFile._Tile("raw", (0, 0) + size, 0, ("1", 0, -1))],
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
frame.alpha = True
|
|
||||||
|
|
||||||
frame.save(image_io, "dib")
|
frame.save(image_io, "dib")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user