From: Toni Martir To: Earl F. Glynn Subject: RE: How to extract a bitmap from an avi file Date: Wednesday, January 20, 1999 4:32 AM I have one example pavi:PAVIFile; pavis:PAVIStream; pavisound:PAVIStream; ob:PGetFrame; pbmi:PBitmapInfoHeader; Punter:PByte; han,i:integer; Desti:TCanvas; microsperframe:integer; principio,fin:integer; if 0<>AVIFIleOpen(pavi,Pchar(FFilename),OF_READ,nil) then Raise Exception.Create('No se pudo abrir el archivo'); Desti:=Canvas; if AVIERR_NODATA=AVIFILEGetStream(pavi,pavis,streamtypeVIDEO,0) then Raise Exception.Create('Error no hay pista de audio'); principio:=AVIStreamStart(pavis); fin:=AVIStreamENd(pavis); ShowMessage(IntToStr(AVIStreamLength(pavis))); ob:=AVIStreamGetFrameOpen(pavis,nil); if nil=ob then Raise Exception.Create('Error en Frameopen'); han:=DrawDIBOpen; try microsperframe:=Trunc(1000000/(info.dwRate/info.dwScale)); DrawDIBStart(han,microsperframe); DrawDIBStart(han,microsperframe); i:=0; if 0<>AVIStreamBeginStreaming(pavis,principio,fin,1000) then Raise Exception.Create('Error n AVIBegin'); pbmi:=AVIStreamGetFrame(ob,i); While pbmi<>Nil do begin Punter:=Pointer(Integer(pbmi)+pbmi^.biSize); DRawDIBBegin(han,desti.handle,0,0,pbmi,pbmi^.biWidth,pbmi^.biheight,DDF_ANIM ATE); DrawDIBRealize(han,desti.handle,false); DrawDIBDraw(han,desti.handle,0,0,pbmi^.biWidth,pbmi^.biheight,pbmi,Punter,0, 0,pbmi^.biwidth,pbmi^.biheight,0); DrawDIBEnd(han); inc(i); pbmi:=AVIStreamGetFrame(ob,i); end; AVIStreamEndStreaming(pavis); DrawDIBStop(han); finally DrawDIBClose(han); end; AVIStreamGetFrameClose(ob); AVIStreamRelease(pavis); end; -----Mensaje original----- De: Earl F. Glynn Para: Toni Martir Fecha: martes, 19 de enero de 1999 21:40 Asunto: Re: How to extract a bitmap from an avi file >Toni: > >>You can email-me if do you want this file. > > >Do you have any examples of using this file? > >efg >_________________________________ >efg's Computer Lab: www.efg2.com/Lab > >Earl F. Glynn >Overland Park, KS USA