SetPreviewImageAttributes

Description

Sets image attributes such as picture size and zoom value for previewing a picture.

Applies to

Camera objects

Syntax

objectname.SetPreviewImageAttributes ( attrValue )

Argument

Description

objectname

The name of the camera object for which you want to set preview attributes

attrValue

A CameraImageAttributes structure that contains the attributes to be set for the device

Returns

Integer. Returns 1 for success, and one of the following negative values if an error occurs:

Usage

You can set different attributes for previewing and capturing images. Typical preview values are 160 and 120 pixels for width and height and 2 for zoom. Image sizes available depend on the device, but usually fewer sizes are available for preview.

Examples

Example 1

This example gets the attributes that are available for a device in an array of CameraImageAttributes structures and displays them to the user so that the user can select the set of attributes to be used for preview and capture:

CameraImageAttributes AllowedConfigs[]
g_myCam.GetAllowedImageAttributes(AllowedConfigs)

// Display choices to user and let user select
// a preview and capture configuration
...
// User chose 1 for preview, 3 for capture
g_myCam.SetPreviewImageAttributes(AllowedConfigs[1])
g_myCam.SetCaptureImageAttributes(AllowedConfigs[3])

See also