Registriert seit: 24. Jan 2005
Ort: Attendorn/Sauerland
235 Beiträge
Turbo Delphi für Win32
|
Re: Webcam-Entwicklung: Brauche Eure Hilfe!
2. Mär 2005, 20:09
Delphi-Quellcode:
procedure processGrab;
begin
Form1.tsCap321.CapOrder:=start;
Form1.tsCap321.CapOrder:=grab; <---------------------- eigentlicher Frame wird gegrabbt
Form1.tsCap321.CapOrder:=stop;
end;
procedure TForm1.Timer1Timer(Sender: TObject); <---------------- Timer-Intervall liegt bei 10 Sek
var time1,time2: ttimestamp;
begin
if ready then
begin
Label10.caption:='Status: sending ...';
time1:=DateTimeToTimeStamp(Time);
processGrab;
processFTP;
time2:=DateTimeToTimeStamp(Time);
processtime:=time2.time-time1.time;
Label11.caption:='Processtime: '+inttostr(processtime)+' ms';
Label10.caption:='Status: waiting ...';
end;
end;
procedure TForm1.tsCap321Bitmap(Sender: TObject; Bitmap: TBitmap;
msSinceFirstFrame: Cardinal);
var datei: string;
begin
Image1.Picture.Bitmap:=Bitmap; <--------------------------- hier scheint der Speicher vollzulaufen
datei:=Extractfilepath(Application.exename)+'/'+fname;
with TJpegImage.Create do
try
Assign(Image1.Picture.Graphic);
SaveToFile(datei);
finally
Free;
end;
end;
|
|
Zitat
|