File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -152,11 +152,18 @@ def main():
152152 )
153153 parser .add_argument (
154154 "--video-format" ,
155- help = "Output format for the animation files. Supports mp4 and webm" ,
155+ help = "Output format for the animation files. Supports mp4 (default) and webm" ,
156156 type = str ,
157157 default = "mp4" ,
158158 choices = ["mp4" , "webm" ],
159159 )
160+ parser .add_argument (
161+ "--img-format" ,
162+ help = "Output format for the image files. Supports jpg (default) and png" ,
163+ type = str ,
164+ default = "jpg" ,
165+ choices = ["jpg" , "png" ],
166+ )
160167
161168 subparsers = parser .add_subparsers (dest = "subcommand" , help = "subcommand help" )
162169
@@ -332,7 +339,9 @@ def main():
332339 video = cv2 .VideoCapture (str (scene .renderer .file_writer .movie_file_path ))
333340 success , image = video .read ()
334341 if success :
335- image_file_name = "git-sim-" + args .subcommand + "_" + t + ".jpg"
342+ image_file_name = (
343+ "git-sim-" + args .subcommand + "_" + t + "." + args .img_format
344+ )
336345 image_file_path = os .path .join (
337346 os .path .join (config .media_dir , "images" ), image_file_name
338347 )
You can’t perform that action at this time.
0 commit comments