XE6 控件太强了CameraComponent就可以了
CameraComponent1.Active := True; procedure TCameraComponentForm.CameraComponent1SampleBufferReady(Sender: TObject; const ATime: Int64); begin TThread.Synchronize(TThread.CurrentThread, GetImage); // imgCameraView.Width := imgCameraView.Bitmap.Width; // imgCameraView.Height := imgCameraView.Bitmap.Height; end; procedure TCameraComponentForm.GetImage; begin CameraComponent1.SampleBufferToBitmap(imgCameraView.Bitmap, True); end; procedure TCameraComponentForm.btnSaveClick(Sender: TObject); var filename: string; begin filename := FormatDateTime(‘yymmddHHmmss‘, Now()) + ‘.jpg‘; filename := TPath.GetPicturesPath + PathDelim + filename; imgCameraView.Bitmap.SaveToFile(filename); end;