2 from typing_extensions import Literal
4 from .Image import Image
6 QImage = Any # imported from either of {PyQt6,PySide6,PyQt5,PySide2}.QtGui
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: ...
18 class ImageQt(QImage): # type: ignore
19 def __init__(self, im: Image) -> None: ...
21 def toqimage(im: Image) -> ImageQt: ...
22 def toqpixmap(im: Image) -> QPixmap: ...