massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / Pillow / PIL / ImageQt.pyi
1 from typing import Any
2 from typing_extensions import Literal
3
4 from .Image import Image
5
6 QImage = Any  # imported from either of {PyQt6,PySide6,PyQt5,PySide2}.QtGui
7 QPixmap = Any
8
9 qt_versions: Any
10 qt_is_installed: bool
11 qt_version: Any
12
13 def rgb(r: int, g: int, b: int, a: int = ...) -> int: ...
14 def fromqimage(im: Image | QImage) -> Image: ...
15 def fromqpixmap(im: Image | QImage) -> Image: ...
16 def align8to32(bytes: bytes, width: int, mode: Literal["1", "L", "P"]) -> bytes: ...
17
18 class ImageQt(QImage):  # type: ignore
19     def __init__(self, im: Image) -> None: ...
20
21 def toqimage(im: Image) -> ImageQt: ...
22 def toqpixmap(im: Image) -> QPixmap: ...