mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-03 22:06:18 +03:00
Coverage change fix
This commit is contained in:
parent
bed2ed7438
commit
096d2bf64a
|
@ -357,13 +357,6 @@ class BLP1Decoder(_BLPBaseDecoder):
|
||||||
image.tile = [("jpeg", (0, 0) + self.size, 0, ("RGBA", ""))]
|
image.tile = [("jpeg", (0, 0) + self.size, 0, ("RGBA", ""))]
|
||||||
|
|
||||||
b, g, r, a = image.split()
|
b, g, r, a = image.split()
|
||||||
if not any(
|
|
||||||
[a.getpixel((x, y)) for x in range(a.width) for y in range(a.height)]
|
|
||||||
):
|
|
||||||
# try to unprotect completely transparent pictures
|
|
||||||
from PIL import ImageOps
|
|
||||||
|
|
||||||
a = ImageOps.invert(a)
|
|
||||||
image = Image.merge("RGBA", (r, g, b, a))
|
image = Image.merge("RGBA", (r, g, b, a))
|
||||||
self.set_as_raw(image.tobytes())
|
self.set_as_raw(image.tobytes())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user