Autor Beitrag
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: So 02.04.06 19:36 
Hallo!


Ich lasse mir einen Webcamframe damit anzeigen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
function capCreateCaptureWindow(lpszWindowName: LPCSTR;
    dwStyle: DWORD;
    x, y,
    nWidth,
    nHeight: integer;
    hwndParent: HWND;
    nID: integer): HWND; stdcall;
    external 'AVICAP32.DLL' name 'capCreateCaptureWindowA';

...

var
  Handle: THandle;
begin
  Handle := capCreateCaptureWindow(PChar('Webcam'),
    WS_CHILD or WS_VISIBLE, 0, 0, 300, 300,
    Panel1.Handle, 0);  // Image1.Picture.Bitmap.Handle
  SendMessage(Handle, WM_CAP_DRIVER_CONNECT, 0, 0);
  SendMessage(Handle, WM_CAP_SET_PREVIEWRATE, 30, 0);
  SendMessage(Handle, WM_CAP_SET_OVERLAY, 1, 0);
  SendMessage(Handle, WM_CAP_SET_PREVIEW, 1, 0);
end;


Nun will ich das ganze in einen Stream bekommen um es dann zu senden. Als erstes habe ich gelesen das ich statt Panel1.Handle auch das im Kommentar daneben verwenden kann, geht aber nicht :(

Jetzt meine Frage: Wie kann ich das Bild aus dem Panel in einen Stream bekommen?


greetz


EDIT: Quelle: www.delphi-forum.de/...amp;highlight=webcam

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.


Zuletzt bearbeitet von Born-to-Frag am Mi 05.04.06 10:09, insgesamt 1-mal bearbeitet
Born-to-Frag Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mi 05.04.06 10:06 
Hat denn keiner eine Idee? Wenn ich den Frame aus dem Panel in einen Stream bekommen würde währe alle super :)

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mi 05.04.06 10:26 
versuchs mal mit bitblt in ne temporäre bitmap zu zeichnen, von da aus sollte es weiter gehen.
Born-to-Frag Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mi 05.04.06 10:29 
user profile iconF34r0fTh3D4rk hat folgendes geschrieben:
versuchs mal mit bitblt


Das ist das denn :nixweiss: ??

Danke schomal :)

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mi 05.04.06 10:30 
drück mal f1 da steht glaube ich sogar wie du das verwendest ;)
Born-to-Frag Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mi 05.04.06 10:32 
Da finde ich das garnich :shock:

EDIT: gefunden ;)

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mi 05.04.06 10:33 
man man man: Suche in: Delphi-Forum, Delphi-Library BITBLT
Born-to-Frag Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mi 05.04.06 10:41 
Juhuu funktioniert :) :beer:

ausblenden Delphi-Quelltext
1:
BitBlt(Image1.Canvas.Handle, 0, 0, 300, 300, GetWindowDC(Panel1.Handle), 0, 0, SRCCOPY);					

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.