Skip to content

Commit

Permalink
add video support for pngs
Browse files Browse the repository at this point in the history
  • Loading branch information
YvesSchoenberg committed Oct 10, 2023
1 parent c1a3b54 commit 4069d15
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "robologs-ros-utils"
version = "0.1.1a51"
version = "0.1.1a52"
description = "robologs-ros-utils is an open source library of containerized data transformations for the robotics and drone communities"
authors = ["roboto.ai <[email protected]>"]
license = "Apache-2.0"
Expand Down
10 changes: 9 additions & 1 deletion python/robologs_ros_utils/sources/ros1/ros_img_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ def create_video_from_images(input_path, output_path, output_name="video.mp4", f
output_video_path = os.path.join(output_path, output_name)
output_video_path_temp = os.path.join(output_path, "temp.mp4")

for filename in sorted(glob.glob(os.path.join(input_path, "./*.jpg"))):
img_list = sorted(glob.glob(os.path.join(input_path, "./*.jpg")))

if not img_list:
sorted(glob.glob(os.path.join(input_path, "./*.png")))

if not img_list:
return

for filename in img_list:
img = cv2.imread(filename)
if resize:
img = cv2.resize(img, (0, 0), fx=resize, fy=resize, interpolation=cv2.INTER_LANCZOS4)
Expand Down

0 comments on commit 4069d15

Please sign in to comment.