This document introduces you to the Snapshot API.
This API allows the client to request snapshot data in a specified image format for both still images and video. The client can specify the properties of the snapshot, such as size, background colour and position to be used. For example, details about whether the snapshot has been scaled.
Snapshot API Library Details
The DLL that provides the functionality and the library to which your code must link is identified below.
The client application using this API should provide McameraObserver2 interface to be signalled, with event KuidECamEventCameraSnapshot , when snapshot data is available to be retrieved from the Ecam server. The client can then retrieve the snapshot data from the server.
The key classes that make up the Snapshot API are as follows:
This class allows a client to request snapshot data in a specified image format for both still images and video.
CCameraSnapshot::SupportedFormats()
Gets a list of the camera formats for which the server supports snapshots.
CCamera::CCameraSnapshot::PrepareSnapshotL()
Selects snapshot parameters. The following example shows how to do this:
// Gets the list of supported formats for snapshots TUint suppFormats = snap->SupportedFormats(); CCamera::TFormat format = CCamera::EFormatJpeg; if(suppFormats & format) { // Sets the properties of the snapshot data including // background colour and the position of the snapshot TSize sShotSize(90,50); TRgb bgrndColor(100,100,100); TBool aspectRatio = ETrue; TPoint orgPos(2,2); snap->PrepareSnapshotL(format, orgPos, sShotSize, bgrndColor,aspectRatio);
CCamera::CCameraSnapshot::IsSnapshotActive()
Determines if the snapshot feature is active.
CCamera::CCameraSnapshot::StartSnapshot()
Request notifications from the Camera.
CCamera::CCameraSnapshot::StopSnapshot()
Stops receiving snapshot notifications.
CCamera::CCameraSnapshot::SnapshotDataL()
Returns the snapshot data from server to the client.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.