LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving multiple images (AVI frames) in the same folder

Solved!
Go to solution

hello,

I am trying to write a VI, in which I want to save multiple pictures (frames I've extracted from an AVI file) in PNG format in a folder. I have managed to save one frame, but I don't really know how to do that for multiple frames. I know I need to do a "for loop" for getting frames and I need to do a "for loop" for changing the name of an image while saving in a folder, but how do I run a "for loop" on a name of a saved image?   

my VI is included.

thank you!

0 Kudos
Message 1 of 4
(2,929 Views)

Typically, you use a string to format a name (e.g. with Format Into String). Use "i" and %d, to get an iteration number in the string. Then use Build Path or String To Path to convert to path.

0 Kudos
Message 2 of 4
(2,923 Views)

thank you for replying.

I've tried to do what you suggested, but I'm getting an error and I'm not sure why. 

attaching my VI with the error. 

Download All
0 Kudos
Message 3 of 4
(2,897 Views)
Solution
Accepted by topic author Lanna12

You tried "too hard".  Make the Folder a constant, only build the file name, like this:

Create Frames.png

 

Bob Schor

0 Kudos
Message 4 of 4
(2,888 Views)