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():
152
152
)
153
153
parser .add_argument (
154
154
"--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" ,
156
156
type = str ,
157
157
default = "mp4" ,
158
158
choices = ["mp4" , "webm" ],
159
159
)
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
+ )
160
167
161
168
subparsers = parser .add_subparsers (dest = "subcommand" , help = "subcommand help" )
162
169
@@ -332,7 +339,9 @@ def main():
332
339
video = cv2 .VideoCapture (str (scene .renderer .file_writer .movie_file_path ))
333
340
success , image = video .read ()
334
341
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
+ )
336
345
image_file_path = os .path .join (
337
346
os .path .join (config .media_dir , "images" ), image_file_name
338
347
)
You can’t perform that action at this time.
0 commit comments