using IDLgrMpeg ? [message #19022] |
Sun, 20 February 2000 00:00 |
John Boccio
Messages: 12 Registered: December 1999
|
Junior Member |
|
|
Hi,
here is a code sample .....
myMPEG = OBJ_NEW('IDLgrMPEG', FILENAME=file)
;loop through frames
for i=0,numframes do begin
;Tell user how our progress is
progresstext='Processing frame '+strtrim(string(i+1),1)+' of ' $
+strtrim(string(numframes+1),1)
widget_control,wProgressText,set_value=progresstext
;calculate timeindex for frame and assign to state
time=time+resolution
sState.timeindex=fix((time-TimeMin)*sState.datasize/(TimeMax -TimeMin))
if sState.timeindex eq sState.datasize then $
sState.timeindex=sState.datasize-1
;update everything that changes with time
newvalue=1.0*sState.timeindex*maxvalue/sState.datasize
sState.oTimeSlider->setValue,0,newvalue
updatetimechange,sState,time
;oBuffer->Draw,sState.oScene
;oImage=oBuffer->Read()
;oImage->GetProperty,data=ImageData
sState.oWindow->Draw,sState.oScene
ImageData=sState.oWindow->Read()
myMPEG -> Put, ImageData
In uncommented code, I see scene changing in window, MPEG is created.
In commented code, scene does not change in window, MPEG is created.
In both cases the MPEG created has terrible resolution (window is
800x800 truecolor on PowerMacintosh). By this I mean that it looks as
if it is sampling 1 pixel in square of 4x4 and then blowing that picxel
up to 4x4 creating a blocky looking image in each MPEG frame.
Anyone have any tricks up their sleeve for using IDLgrMpeg ?
Thanks,
John Boccio
boccio@swarthmore.edu
|
|
|