We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d1d801 commit 624848fCopy full SHA for 624848f
Tests/test_file_jpeg.py
@@ -543,10 +543,10 @@ def test_truncated_jpeg_throws_oserror(self) -> None:
543
)
544
def test_qtables(self, tmp_path: Path) -> None:
545
def _n_qtables_helper(n: int, test_file: str) -> None:
546
+ b = BytesIO()
547
with Image.open(test_file) as im:
- f = str(tmp_path / "temp.jpg")
548
- im.save(f, qtables=[[n] * 64] * n)
549
- with Image.open(f) as im:
+ im.save(b, "JPEG", qtables=[[n] * 64] * n)
+ with Image.open(b) as im:
550
assert len(im.quantization) == n
551
reloaded = self.roundtrip(im, qtables="keep")
552
assert im.quantization == reloaded.quantization
0 commit comments