For now the type hints of convert_image
is:
def convert_image(
src: pathlib.Path, dst: pathlib.Path, **params: Optional[dict]
) -> None:
But we can use io.BytesIO()
as src and dst.
Also, When I try to put the fmt="PNG"
as a parameter, the Pyright will complain : Type "Literal['PNG']" cannot be assigned to type "dict[Unknown, Unknown] | None