From f86753561c8c6ae948e0804c20d732a41055fb57 Mon Sep 17 00:00:00 2001 From: dynobo Date: Thu, 28 Jul 2022 21:43:38 +0200 Subject: [PATCH] Add new Resampling enum to Pillow Image --- stubs/Pillow/PIL/Image.pyi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stubs/Pillow/PIL/Image.pyi b/stubs/Pillow/PIL/Image.pyi index d892d2187031..3f6cb451dfb9 100644 --- a/stubs/Pillow/PIL/Image.pyi +++ b/stubs/Pillow/PIL/Image.pyi @@ -1,5 +1,6 @@ from _typeshed import Self, SupportsRead, SupportsWrite from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence +from enum import IntEnum from pathlib import Path from typing import Any, ClassVar, Protocol, SupportsBytes, Union from typing_extensions import Literal, TypeAlias @@ -56,6 +57,15 @@ PERSPECTIVE: Literal[2] QUAD: Literal[3] MESH: Literal[4] +class Resampling(IntEnum): + NEAREST: Literal[0] + BOX: Literal[4] + BILINEAR: Literal[2] + HAMMING: Literal[5] + BICUBIC: Literal[3] + LANCZOS: Literal[1] + +# deprecated, removed in Pillow 10 NEAREST: Literal[0] BOX: Literal[4] BILINEAR: Literal[2]