@@ -17,6 +17,8 @@ class ImagePlaceholder:
|
||||
def display_new_image(self):
|
||||
image_path = self.images[0]
|
||||
self.images.pop(0)
|
||||
if image_path == "break":
|
||||
image_path = 'assets/images/break.gif'
|
||||
self.current_original_image = Image.open(image_path)
|
||||
self.current_image = copy.deepcopy(self.current_original_image)
|
||||
self.apply_options()
|
||||
@@ -45,6 +47,11 @@ class ImagePlaceholder:
|
||||
self.resize_image(True)
|
||||
|
||||
def load_widget(self):
|
||||
image_to_display = ImageTk.PhotoImage(self.current_image)
|
||||
print(self.current_image.format)
|
||||
if self.current_image.format == "GIF":
|
||||
print("is gif !")
|
||||
image_to_display = ImageTk.PhotoImage(self.current_image, format = "gif -index 2")
|
||||
else:
|
||||
image_to_display = ImageTk.PhotoImage(self.current_image)
|
||||
self.image_label.configure(image=image_to_display)
|
||||
self.image_label.image = image_to_display
|
||||
|
Reference in New Issue
Block a user