def load_image(self, image=""):
self.widget_canvas_image.delete("all")
self.image_open = Image.open(image, "r")
self.image_photo = ImageTk.PhotoImage(self.image_open)
self.original_width = self.image_photo.width()
self.original_height = self.image_photo.height()
self.widget_canvas_image.configure(scrollregion=(0, 0, self.image_photo.width(), self.image_photo.height()))
self.widget_canvas_image.configure(width=self.image_photo.width(), height=self.image_photo.height())
self.drawn_image = self.widget_canvas_image.create_image(0, 0, anchor="nw", image=self.image_photo,
tags="image")
self.title("{} - {}".format(self.title(), "".join(os.path.splitext(image))))
self.check_tile_buttons()
self.draw_background()
评论列表
文章目录