Skip to content

Commit

Permalink
Fix imageio issue only for create gif
Browse files Browse the repository at this point in the history
  • Loading branch information
healthonrails committed Dec 20, 2023
1 parent 2cb38ba commit b3b7acc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions annolid/utils/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import platform
import shutil
import glob
import imageio


def find_most_recent_file(folder_path):
Expand Down Expand Up @@ -193,6 +192,7 @@ def create_gif(img_folder: str, gif_name: str,
--------
None
"""
import imageio
# Get the paths of the images
saved_img_paths = gb.glob(img_folder + "/*." + suffix)

Expand All @@ -206,7 +206,7 @@ def create_gif(img_folder: str, gif_name: str,
# Load the images and resize them to the specified size
frames = []
for img_path in sorted(saved_img_paths)[start_frame:end_frame]:
img = imageio.imread(img_path)
img = cv2.imread(img_path)
img = cv2.resize(img, size)
frames.append(img)

Expand Down

0 comments on commit b3b7acc

Please sign in to comment.