user1931849
user1931849

Reputation: 169

delphi webcam photo on a Timage/Tbitmap

i'm using this code to take a photo from webcam:

if hWndC <> 0 then
  begin
    SendMessage(hWndC, WM_CAP_SAVEDIB, 0,
      longint(StringToPAnsiChar('C:\Test.bmp')));
  end;

this code will save the photo, how can i take this photo without pass throug a file and store it directly to a Tbitmap or Timage?

sorry for my bad english. thanks in advance

Upvotes: 0

Views: 1235

Answers (1)

fpiette
fpiette

Reputation: 12322

You can use Video For Windows (FVW) and/or DirectX for such work. I successfully use code from [email protected] (VFrames.pas and FSample.pas) which are available from http://siapen.googlecode.com/svn/trunk/webcam/Common/ I use this code with XE4 using DirectX headers provided by XE4. This article may be useful to: Delphi Webcam Simple Program

Upvotes: 3

Related Questions