gpt4 book ai didi

delphi - 使用 Delphi 程序更改网络摄像头视频的分辨率

转载 作者:行者123 更新时间:2023-12-03 18:33:13 24 4
gpt4 key购买 nike

如何在 VFrames 中将网络摄像头的大小从 (640x360) 更改为默认值|转换为 (160x120) 作为新的默认值。

我正在使用 this component 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;

确保 GetListOfSupportedVideoSizesSetResolutionByIndex在视频开始播放后执行

关于delphi - 使用 Delphi 程序更改网络摄像头视频的分辨率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9108973/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com