实时代码:从台式计算机上的相机捕获静止图像



如何使用 LiveCode 从台式计算机上的相机捕获静止图像?

我正在使用以下代码在移动设备上捕获图像:

mobilePickPhoto "front camera" ,100 , 100

首先使用外部视频采集卡设置相机。

revIinitializeVideoGrabber the short name of this stack,"QT","20,20,120,86"

现在你可以抓住一个框架:

revVideoFrameImage 66,100,myPictureData

并设置图像控件的图像数据:

set the imageData of img 1 to myPîctureData

现在将其导出为PNG例如

export img 1 to myPictureData as PNG

您可以将 myPictureData 写入文件。

revVideoGrabber 外部可能无法与最新版本的 LiveCode 一起使用。

最新更新