There was an error while loading. Please reload this page.
1 parent d0ea334 commit a9fd14bCopy full SHA for a9fd14b
1 file changed
Tests/benchmarks.py
@@ -868,7 +868,8 @@ def test_quantize_to_palette(
868
size: tuple[int, int],
869
) -> None:
870
if isinstance(source_type, pathlib.Path):
871
- im = Image.open(source_type).convert("RGB").resize(size)
+ with Image.open(source_type) as source_im:
872
+ im = source_im.convert("RGB").resize(size)
873
elif source_type == "synthetic":
874
im = make_pillow_image("RGB", size)
875
if palette_type == "exact":
0 commit comments