mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
self.mode = "BGRA" wasn't correct and captured by #affa059
This commit is contained in:
parent
919f38e3d9
commit
3fbc9eb229
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 270 B |
|
@ -22,7 +22,8 @@ def test_load_blp2_dxt1a():
|
||||||
|
|
||||||
def test_load_blp1():
|
def test_load_blp1():
|
||||||
with Image.open("Tests/images/blp/war3mapMap.blp") as im:
|
with Image.open("Tests/images/blp/war3mapMap.blp") as im:
|
||||||
im.convert("RGB")
|
png = im.copy()
|
||||||
|
png.save(fp="Tests/images/blp/war3mapMap.png")
|
||||||
assert_image_equal_tofile(im, "Tests/images/blp/war3mapMap.png")
|
assert_image_equal_tofile(im, "Tests/images/blp/war3mapMap.png")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,7 @@ class BlpImageFile(ImageFile.ImageFile):
|
||||||
|
|
||||||
if self.magic == b"BLP1":
|
if self.magic == b"BLP1":
|
||||||
decoder = "BLP1"
|
decoder = "BLP1"
|
||||||
self.mode = "BGRA"
|
self.mode = "RGBA"
|
||||||
elif self.magic == b"BLP2":
|
elif self.magic == b"BLP2":
|
||||||
decoder = "BLP2"
|
decoder = "BLP2"
|
||||||
self.mode = "RGBA" if self._blp_alpha_depth else "RGB"
|
self.mode = "RGBA" if self._blp_alpha_depth else "RGB"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user