delphi 屏幕抓图有关问题
delphi 屏幕抓图问题
摄像头捕捉程序 我在上面textout了一行文字 但是抓图的时候 根本没有我的这行文字啊?
我想抓图的时候连这行文字也取到 在save中该如何写?
procedure TForm1.A_BitmapExecute(Sender: TObject);
var
ABitmap: TBitmap;
begin
if not SaveDialog1.Execute then exit;
ABitmap := TBitmap.Create;
try
SampleGrabber1.GetBitmap(ABitmap);
ABitmap.SaveToFile(SaveDialog1.FileName);
finally
ABitmap.Free;
end;
end;
我是这样写的 请问该怎么改正?
------解决方案--------------------
ABitmap.canvas.textout(0,0,'楼主我接分');
ABitmap.SaveToFile(SaveDialog1.FileName);
------解决方案--------------------
抓图时,你textout的文字已经被callback出来的图像刷新了.
解决方法有两种
1.调用DirectShow,写个摄像头的Filter,主要实现就是显示文字
2.如mwy654321说的一样,将callback出来的图像截图保存在ABitmap中,然后再将文字textout在截取出来的这个ABitmap上....
摄像头捕捉程序 我在上面textout了一行文字 但是抓图的时候 根本没有我的这行文字啊?
我想抓图的时候连这行文字也取到 在save中该如何写?
procedure TForm1.A_BitmapExecute(Sender: TObject);
var
ABitmap: TBitmap;
begin
if not SaveDialog1.Execute then exit;
ABitmap := TBitmap.Create;
try
SampleGrabber1.GetBitmap(ABitmap);
ABitmap.SaveToFile(SaveDialog1.FileName);
finally
ABitmap.Free;
end;
end;
我是这样写的 请问该怎么改正?
------解决方案--------------------
ABitmap.canvas.textout(0,0,'楼主我接分');
ABitmap.SaveToFile(SaveDialog1.FileName);
------解决方案--------------------
抓图时,你textout的文字已经被callback出来的图像刷新了.
解决方法有两种
1.调用DirectShow,写个摄像头的Filter,主要实现就是显示文字
2.如mwy654321说的一样,将callback出来的图像截图保存在ABitmap中,然后再将文字textout在截取出来的这个ABitmap上....