<doc>
  <legacy_id>2314</legacy_id>
  <name>revVideoFrameImage</name>
  <type>command</type>
  <syntax>
    <example>revVideoFrameImage <i>frameWidth</i>,<i>frameHeight</i>,<i>dataVariable</i></example>
  </syntax>
  <library>Video library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Images &amp; Multimedia</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="revRecordVideo">revRecordVideo Command</command>
    <property tag="imageData">imageData Property</property>
    <command tag="revPreviewVideo">revPreviewVideo Command</command>
  </references>
  <history>
    <introduced version="2.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
  </platforms>
  <classes>
    <desktop/>
  </classes>
  <security>
    <disk access="???"/>
    <privacy/>
  </security>
  <summary>Puts the current <glossary tag="frame">frame</glossary> in the <glossary tag="video grabber">video grabber</glossary> into a <glossary tag="variable">variable</glossary>.</summary>
  <examples>
    <example>revVideoFrameImage 400,300,"myData"</example>
    <example>revVideoFrameImage the width of image "Snapshot",\</p><p>   the height of image "Snapshot","thisFrame"</example>
  </examples>
  <description>
    <p>Use the <b>revVideoFrameImage</b> <glossary tag="command">command</glossary> to capture a single <glossary tag="frame">frame</glossary> of video.</p><p/><p><b>Parameters:</b></p><p>The <i>frameWidth</i> is a positive <keyword tag="integer">integer</keyword>.</p><p/><p>The <i>frameHeight</i> is a positive <keyword tag="integer">integer</keyword>.</p><p/><p>The <i>dataVariable</i> is the name of an existing <glossary tag="variable">variable</glossary>.</p><p/><p><b>Comments:</b></p><p>The <b>revVideoFrameImage</b> <glossary tag="command">command</glossary> <glossary tag="return">returns</glossary> <glossary tag="binary data">binary data</glossary> in the same <function tag="format">format</function> as the <property tag="imageData">imageData</property> <glossary tag="property">property</glossary> of <glossary tag="image">images</glossary>, placing it in the <i>dataVariable</i>. To show the captured frame in an image, set the <glossary tag="image">image's</glossary> <property tag="imageData">imageData</property> <glossary tag="property">property</glossary> to the <function tag="value">value</function> placed in the <i>dataVariable</i>, as in the following example:</p><p/><p><code>  put empty into frameContainer</code></p><p><code>  revVideoFrameImage 400,300,"frameContainer"</code></p><p><code>  set the imageData of image "Picture" to frameContainer</code></p><p/><p>If the <i>frameWidth</i> and <i>frameHeight</i> are not the same as the width and height of the <glossary tag="video grabber">video grabber window</glossary>, the frame is scaled before being returned by the <b>revVideoFrameImage</b> <control_st tag="function">function</control_st>. The data <glossary tag="return">returned</glossary> by the <glossary tag="command">command</glossary> always uses the <i>frameWidth</i> and <i>frameHeight</i>, even if this means the video must be stretched or shrunk to fit. For example, if the <glossary tag="video grabber">video grabber window</glossary> is 100 x 100 <property tag="pixels">pixels</property>, but you specify 200 as the <i>frameWidth</i> and 100 as the <i>frameHeight</i>, the <glossary tag="return">returned</glossary> data fits an <keyword tag="image">image</keyword> 200 x 100 <property tag="pixels">pixels</property>, with the horizontal dimension stretched to fit.</p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> The <b>revVideoFrameImage</b> <glossary tag="command">command</glossary> is part of the <glossary tag="Video library">Video library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section on the General screen of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure that "Video Grabber" is selected from the list of script libraries.</p>
  </description>
</doc>