mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-22 21:17:04 +08:00
Add types for PIL.ImageTk (#9733)
This commit is contained in:
1 parent
0bb7d621d3
commit
f5b761d465
3 files changed
+80
-22
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# Verify that ImageTK images are valid to pass to TK code.
|
||||
from __future__ import annotations
|
||||
|
||||
import tkinter
|
||||
|
||||
from PIL import ImageTk
|
||||
|
||||
photo = ImageTk.PhotoImage()
|
||||
bitmap = ImageTk.BitmapImage()
|
||||
|
||||
tkinter.Label(image=photo)
|
||||
tkinter.Label(image=bitmap)
|
||||
|
||||
tkinter.Label().configure(image=photo)
|
||||
tkinter.Label().configure(image=bitmap)
|
||||
Reference in new issue
Block a user