## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### VCAI_GETIMAGESCALE (6Ch) - Get Image and Scale into RAM Buffer

Category:
VIDEO_IOCTL_CAT (140)
Function:
VCAI_GETIMAGESCALE (6Ch)
Description:
Get Image and Scale into RAM Buffer

Select an item:

    Description
    Parameter Packet Format
    Data Packet Format
    Returns
    Remarks

This IOCtl is used to capture a single frame of data from the video capture device to a buffer provided by the calling application.

The video capture device has a capture frame buffer, which contains the current, full sized image captured (or digitized) by the device. The portion of the full sized image that is to be copied to the calling applications buffer is indicated by the source frame, which describes a window in the captured frame. The source frame can encompass part or all of the captured frame. The image data contained in the source frame dimensions are copied to a destination frame. The following figure illustrates this.

            0,0                       0,0
            /--------------------\    /--------------------\
            |   64               |    |                    |
       32   |  /-------------\   |    |                    |
            |  |Source   240 | --+--->|  Destination       |
            |  |             |   |    |                    |
            |  |   320       |   |    |                    |
            |  \-------------/   |    |                    |
            \--------------------/    \--------------------/
                        640,480                      160,120

      X-Left    32
      Y-Top     64
      X-Width  320
      Y-Height 240

If the destination frame is not the same size as the source frame, the source image is scaled down to fit into the destination frame. This allows the image to be reduced to fit in a specific window. It also allows for a change in the aspect ratio.

For better performance, this IOCtl does not validate that the source and destination frames are equal to or smaller than the full sized capture frame. The caller of this function must ensure that the source and destination frame dimensions are less than or equal to the maximum size of the capture frame. Use VCAI_GETDEVINFO to determine the maximum image extents.

Specific device drivers might place restrictions on how scaling from the source frame to the destination frame can occur.