From 366635110fa91d2ff90e6547c5c64ef0c4a19038 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 28 Dec 2024 12:14:30 +1100 Subject: [PATCH] check --- src/PIL/Jpeg2KImagePlugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PIL/Jpeg2KImagePlugin.py b/src/PIL/Jpeg2KImagePlugin.py index b6ebd562be6..79452a63af0 100644 --- a/src/PIL/Jpeg2KImagePlugin.py +++ b/src/PIL/Jpeg2KImagePlugin.py @@ -266,6 +266,8 @@ def _open(self) -> None: else: msg = "not a JPEG 2000 file" raise SyntaxError(msg) + if self.mode == "CMYK": + assert False self._reduce = 0 self.layers = 0