def _draw_frame(self):
if ImageTk is None:
return
try:
image = self._img_queue.popleft()
except IndexError:
# no new image
return
self._first_image = False
photoImage = ImageTk.PhotoImage(image)
self.label.configure(image=photoImage)
self.label.image = photoImage
# Dynamically expand the image to fit the window. And fill in both X and Y directions.
self.label.pack(fill=tkinter.BOTH, expand=True)
评论列表
文章目录