mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
fixup! Add tests for loading/saving of 16-bit quantization tables
This commit is contained in:
parent
2f0544b542
commit
d54dc4062f
|
@ -446,7 +446,7 @@ class TestFileJpeg:
|
|||
assert len(im.quantization) == n
|
||||
reloaded = self.roundtrip(im, qtables="keep")
|
||||
assert im.quantization == reloaded.quantization
|
||||
assert reloaded.quantization[0].typecode == 'B'
|
||||
assert reloaded.quantization[0].typecode == "B"
|
||||
|
||||
with Image.open("Tests/images/hopper.jpg") as im:
|
||||
qtables = im.quantization
|
||||
|
@ -553,12 +553,12 @@ class TestFileJpeg:
|
|||
|
||||
def test_save_multiple_16bit_qtables(self):
|
||||
with Image.open("Tests/images/hopper_16bit_qtables.jpg") as im:
|
||||
im2 = self.roundtrip(im, qtables='keep')
|
||||
im2 = self.roundtrip(im, qtables="keep")
|
||||
assert im.quantization == im2.quantization
|
||||
|
||||
def test_save_single_16bit_qtable(self):
|
||||
with Image.open("Tests/images/hopper_16bit_qtables.jpg") as im:
|
||||
im2 = self.roundtrip(im, qtables=[im.quantization[0]])
|
||||
im2 = self.roundtrip(im, qtables={0: im.quantization[0]})
|
||||
assert len(im2.quantization) == 1
|
||||
assert im2.quantization[0] == im.quantization[0]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user