【问题标题】:TEdgeBrowser.CapturePreview To StreamTEdgeBrowser.CapturePreview 流式传输
【发布时间】:2021-12-10 16:34:34
【问题描述】:
I'm using Delphi 11 and I'm trying to get the EdgeBrowser.CapturePreview to save to 
stream and use later.

In the first example, the file saves correctly. From what I can see the .CapturePreview will save to a file or a stream. But, CapturePreview does not appear to Capture to a stream. Any suggestions?


uses Vcl.Edge;

procedure TFormMain.MenuSaveScreenShotClick(Sender: TObject);
 begin
  //This sample works well and saves a file.
  if SaveDialog1.Execute then EdgeBrowser1.CapturePreview(SaveDialog1.FileName);
 end;

procedure TFormMain.MenuSaveScreenShotClick(Sender: TObject);
 var
   ms:TMemoryStream;
begin
  // Save to Stream...
  ms:=TMemoryStream.Create();
 if dlgSaveScreenshot.Execute then
  EdgeBrowser.CapturePreview(ms);
  ms.Position:=0;
  ms.SaveToFile('test.png');
end;

【问题讨论】:

    标签: delphi-11-alexandria


    【解决方案1】:

    在 CapturePreviewCompleted 事件中保存您的流。

    【讨论】:

      猜你喜欢
      • 2020-07-17
      • 2012-05-18
      • 2014-03-29
      • 2011-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-19
      相关资源
      最近更新 更多