allow bytes in tkinter.PhotoImage (#5171)

This commit is contained in:
Akuli
2021-04-01 13:54:49 +03:00
committed by GitHub
parent dec1396d51
commit e98f398abc

View File

@@ -2647,7 +2647,7 @@ class PhotoImage(Image):
cnf: Dict[str, Any] = ...,
master: Optional[Union[Misc, _tkinter.TkappType]] = ...,
*,
data: str = ..., # not same as data argument of put()
data: Union[str, bytes] = ..., # not same as data argument of put()
format: str = ...,
file: AnyPath = ...,
gamma: float = ...,
@@ -2658,7 +2658,7 @@ class PhotoImage(Image):
def configure(
self,
*,
data: str = ...,
data: Union[str, bytes] = ...,
format: str = ...,
file: AnyPath = ...,
gamma: float = ...,
@@ -2690,7 +2690,7 @@ class BitmapImage(Image):
master: Optional[Union[Misc, _tkinter.TkappType]] = ...,
*,
background: _Color = ...,
data: str = ...,
data: Union[str, bytes] = ...,
file: AnyPath = ...,
foreground: _Color = ...,
maskdata: str = ...,