mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 00:46:16 +03:00
Merge pull request #6678 from radarhere/blp1
This commit is contained in:
commit
9887544faf
BIN
Tests/images/blp/blp1_jpeg2.blp
Normal file
BIN
Tests/images/blp/blp1_jpeg2.blp
Normal file
Binary file not shown.
|
@ -14,6 +14,9 @@ def test_load_blp1():
|
|||
with Image.open("Tests/images/blp/blp1_jpeg.blp") as im:
|
||||
assert_image_equal_tofile(im, "Tests/images/blp/blp1_jpeg.png")
|
||||
|
||||
with Image.open("Tests/images/blp/blp1_jpeg2.blp") as im:
|
||||
im.load()
|
||||
|
||||
|
||||
def test_load_blp2_raw():
|
||||
with Image.open("Tests/images/blp/blp2_raw.blp") as im:
|
||||
|
|
|
@ -373,8 +373,8 @@ class BLP1Decoder(_BLPBaseDecoder):
|
|||
data = BytesIO(data)
|
||||
image = JpegImageFile(data)
|
||||
Image._decompression_bomb_check(image.size)
|
||||
image.mode = "RGB"
|
||||
image.tile = [("jpeg", (0, 0) + self.size, 0, ("BGRX", ""))]
|
||||
r, g, b = image.convert("RGB").split()
|
||||
image = Image.merge("RGB", (b, g, r))
|
||||
self.set_as_raw(image.tobytes())
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user