Movie problems: File extension .#0 instead of .mov and how to adjust image resolution
notwhatucallanatural
Any ideas?
If I play the file in Igor instead (using the playmovie command) the resolution is fine - like the original graph.
The file extension problem happens using OSX 10.7 - I don't have quicktime on my windows virtual machine so it creates .avi files with the correct extension. These play with reasonable resolution, but it would be nice to be able to make the movie bigger without pixelation.
This is the function I'm using to make the movie:
Function ProdDistMovie(MovieTitle,GraphName,time_wave)
// makes a movie file showing distribution of products in O/C space.
string MovieTitle // file name to be created
string GraphName // name of graph window
wave time_wave // time wave
variable N_tpnts=numpnts(time_wave)
NewMovie /F=6 /L/I/O as MovieTitle
variable t_ind
DoWindow /F $GraphName // bring graph to front
string ImageList=imagenamelist("",";")
string ProdDistImg=stringfromlist(0,ImageList) // there should only be one image
for (t_ind=0;t_ind<N_tpnts;t_ind+=1)
TextBox/W=$GraphName/C/N=text1/F=0/E=2/A=RT/X=0.00/Y=0.00 Secs2Time(time_wave[t_ind],1)
modifyimage $ProdDistImg plane=t_ind // update layer of image to show for current time
DoUpdate // update graph before adding movie frame
AddMovieFrame
endfor
CloseMovie
End
// makes a movie file showing distribution of products in O/C space.
string MovieTitle // file name to be created
string GraphName // name of graph window
wave time_wave // time wave
variable N_tpnts=numpnts(time_wave)
NewMovie /F=6 /L/I/O as MovieTitle
variable t_ind
DoWindow /F $GraphName // bring graph to front
string ImageList=imagenamelist("",";")
string ProdDistImg=stringfromlist(0,ImageList) // there should only be one image
for (t_ind=0;t_ind<N_tpnts;t_ind+=1)
TextBox/W=$GraphName/C/N=text1/F=0/E=2/A=RT/X=0.00/Y=0.00 Secs2Time(time_wave[t_ind],1)
modifyimage $ProdDistImg plane=t_ind // update layer of image to show for current time
DoUpdate // update graph before adding movie frame
AddMovieFrame
endfor
CloseMovie
End
contains.
As for the movie size, I see you are doing DoWindow /F AFTER you are calling NewMovie. You should reread the details section of NewMovie especially the paragraph starting "The target window at the time you invoke NewMovie must be a graph"
Basically, the size is determined by the top graph at the time NewMovie is called.
August 28, 2012 at 06:56 am - Permalink
I was changing the window size using expansion from the right click menu, so that it looked the same without having to adjust axis labels etc. Resizing the window by dragging does the job! I also moved DoWindow before NewMovie. All sorted, thanks.
edit: I see that "On Macintosh, the name of the movie file is limited to 31 characters because Igor calls Apple routines that have this limit." This must be the full file name including the extension, as my string was 28 characters long.
August 28, 2012 at 07:22 am - Permalink