revVideoFrameImage | |||||||||||||
Type | command | ||||||||||||
Dictionary | LCS | ||||||||||||
Library | LiveCode Script | ||||||||||||
Syntax |
| ||||||||||||
Associations | video library | ||||||||||||
Summary | Puts the current frame in the video grabber into a variable. | ||||||||||||
Introduced | 2.0 | ||||||||||||
Changes | Support for the "Video Grabber" library on Mac OS X ended in LiveCode 9.0. | ||||||||||||
OS | windows | ||||||||||||
Platforms | desktop | ||||||||||||
Parameters |
| ||||||||||||
Example |
| ||||||||||||
Related | Property: pixels, imageData Glossary: LiveCode custom library, property, binary file, variable, frame, return, Standalone Application Settings, video grabber, standalone application, command Library: Video library Keyword: image Object: image Function: format, value Control Structure: function Command: revPreviewVideo, revRecordVideo | ||||||||||||
Security | disk, privacy | ||||||||||||
Description | Use the revVideoFrameImage command to capture a single frame of video. The revVideoFrameImage command returns binarydata in the same format as the imageData property of images, placing it in the dataVariable. To show the captured frame in an image, set the image's imageData property to the value placed in the dataVariable, as in the following example:
If the frameWidth and frameHeight are not the same as the width and height of the video grabber window, the frame is scaled before being returned by the revVideoFrameImage function. The data returned by the command always uses the frameWidth and frameHeight, even if this means the video must be stretched or shrunk to fit. For example, if the video grabber window is 100 x 100 pixels, but you specify 200 as the frameWidth and 100 as the frameHeight, the returned data fits an image 200 x 100 pixels, with the horizontal dimension stretched to fit.
| ||||||||||||
Tags | multimedia |