Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions stubs/Pillow/PIL/Image.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequen
from enum import IntEnum
from pathlib import Path
from typing import Any, ClassVar, Protocol, SupportsBytes
from typing_extensions import Final, Literal, Self, TypeAlias, TypeGuard
from typing_extensions import Literal, Self, TypeAlias, TypeGuard

from PIL.PyAccess import PyAccess

Expand Down Expand Up @@ -39,7 +39,12 @@ class _Writeable(SupportsWrite[bytes], Protocol):
class DecompressionBombWarning(RuntimeWarning): ...
class DecompressionBombError(Exception): ...

MAX_IMAGE_PIXELS: Final[int]
# Despite the ALL_CAPS spelling, Pillow's docs mention that this threshold can
# be altered at runtime. See
# https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.open
# or the permalink
# https://github.com/python-pillow/Pillow/blob/10.0.0/docs/reference/Image.rst?plain=1#L54-L55
MAX_IMAGE_PIXELS: int | None

USE_CFFI_ACCESS: bool

Expand Down