Pillow/checks/check_j2k_overflow.py
Russell Keith-Magee da10ed1cf3
Add support for iOS (#9030)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2025-06-30 21:46:07 +10:00

15 lines
283 B
Python

from __future__ import annotations
from pathlib import Path
import pytest
from PIL import Image
def test_j2k_overflow(tmp_path: Path) -> None:
im = Image.new("RGBA", (1024, 131584))
target = tmp_path / "temp.jpc"
with pytest.raises(OSError):
im.save(target)