View Full Version : ImageSource(): Multiple Non-Adjacent Frame Ranges
audiohominis
5th January 2010, 00:03
Guys. :)
If I needed to read in a range from a png sequence, while leaving out certain bad frames, e.g. keeping everything from 1400 to 2000 but skipping 1433, 1599, and so on, (collapsing the rest, so to speak), how would I go about it?
Imaginary pseudo-script:
ImageSource("%04d.png", 1400-1432, 1434-1598, 1600-2000 fps=24)
I didn't get this from the Wiki manual.
Please help.
Thanks.
wonkey_monkey
5th January 2010, 00:15
ImageSource("%04d.png", 1400,1432)+ImageSource("%04d.png",1434,1598)+ImageSource("%04d.png",1600,2000)
assumefps(24)
Or this might also work - I think ImageSource will only PNGs as and when they are required:
ImageSource("%04d.png",1400,2000,fps=24)
DeleteFrame(33,199)
# the above edited after IanB pointed out my goof, below
David
poisondeathray
5th January 2010, 00:17
Can't you just split it up?
a=ImageSource("%04d.png", 1400-1432, fps=24)
b=ImageSource("%04d.png", 1434-1598, fps=24)
c=ImageSource("%04d.png", 1600-2000, fps=24)
a+b+c
EDIT: whoops, too slow :)
audiohominis
5th January 2010, 01:57
Thank you so much for the replies, guys.
@poisondeathray
Slow as in performance-wise, or as in you-got-preempted?:p
IanB
5th January 2010, 06:42
You need to remove the not required frames in reverse order or adjust for the shift from each delete. :-ImageSource("%04d.png", 1400, 2000, fps=24)
DeleteFrame(199) # 1599-1400
DeleteFrame(33) # 1433-1400
Or DeleteFrame now takes multiple arguments (and internally sorts so no problem there) :-ImageSource("%04d.png",1400,2000,fps=24)
DeleteFrame(33, 199) # 1433-1400, 1599-1400
audiohominis
5th January 2010, 07:58
Thank you very much too, Ian.:thanks:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.