本文介绍了使用Delphi程序更改网络摄像头视频的分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将网络摄像机的大小从 VFrames
中的默认值(640x360)更改为新的默认值(160x120)。
How do I change the size of the webcam from (640x360) as default in VFrames
into a (160x120) as the new default.
我正在使用可在。
I'm using this component
found on this page
.
推荐答案
VFrames
var
cam:TVideoImage;
camlist:TStringList;
reslist:TStringList;
vp:TVideoProperty;
begin
camlist := TStringList.Create ;
reslist :=TStringList.Create;
cam := TVideoImage.Create;
cam.GetListOfDevices(camlist);
cam.SetDisplayCanvas(PaintBox1.Canvas);
cam.VideoStart(camlist.Strings[0]) ;
// important
cam.GetListOfSupportedVideoSizes(reslist);
ListBox1.Items := reslist;
cam.SetResolutionByIndex(0);
//specify your resolution by index using listbox index
//this will not only lists resolutions but also other features available , so be careful when selecting the index
end;
确保 GetListOfSupportedVideoSizes
和 SetResolutionByIndex
在视频开始播放后执行
make sure that GetListOfSupportedVideoSizes
and SetResolutionByIndex
are executed after the video has started to play
这篇关于使用Delphi程序更改网络摄像头视频的分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!