Pillow: Image fixes (#6848)

* Fix return type of `Image.transform()`.
* Add animation attributes to `Image`.
This commit is contained in:
Luca Chiodini
2022-01-07 17:08:30 +01:00
committed by GitHub
parent 032e6ee90c
commit 3b73acb06b

View File

@@ -110,6 +110,8 @@ class Image:
info: dict[Any, Any]
readonly: int
pyaccess: Any
is_animated: bool # not present on all Image objects
n_frames: int # not present on all Image objects
@property
def width(self) -> int: ...
@property
@@ -209,7 +211,7 @@ class Image:
resample: _Resample = ...,
fill: int = ...,
fillcolor: _Color | int | None = ...,
) -> None: ...
) -> Image: ...
def transpose(self, method: Literal[0, 1, 2, 3, 4, 5, 6]) -> Image: ...
def effect_spread(self, distance: int) -> Image: ...
def toqimage(self): ...