Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: MdaImageConverter.h
Link against: MediaClientImage.lib

Class CMdaImageBitmapToBitmapUtility

CMdaImageBitmapToBitmapUtility

Support

Supported from 5.0

Description

Implements format conversion from one bitmap to another bitmap.

The class provides member functions to create an instance of this conversion utility and to open the source bitmap.

Conversion is performed using the image conversion utility interface.

The main use for this class is for bitmap display mode conversion. Error diffusion is handled if information is lost in the conversion.

Derivation

CActiveThe core class of the active object abstraction
CBaseBase class for all classes to be instantiated on the heap
CMdaImageBitmapToBitmapUtilityImplements format conversion from one bitmap to another bitmap
CMdaImageUtilityThe abstract base class for the image conversion utilities
CMdaResourceBase class used in the derivation of CMdaImageUtility
MMdaObjectStateChangeObserverAn interface class for handling the change of state of an audio data sample object

Defined in CMdaImageBitmapToBitmapUtility:
CancelConvertL(), Close(), ConvertL(), NewL(), OpenL()

Inherited from CActive:
Cancel(), Deque(), DoCancel(), EPriorityHigh, EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, IsActive(), IsAdded(), Priority(), RunError(), RunL(), SetActive(), SetPriority(), TPriority, iStatus

Inherited from CBase:
operator new()

Inherited from CMdaImageUtility:
FrameCount(), FrameInfo()

Inherited from MMdaObjectStateChangeObserver:
MoscoStateChangeEvent()


Construction


NewL()

static CMdaImageBitmapToBitmapUtility* NewL(MMdaImageUtilObserver& aObserver,CMdaServer* aServer = NULL);

Description

Constructs a new instance of the bitmap to bitmap conversion utility object.

The function leaves if this object cannot be created.

Parameters

MMdaImageUtilObserver& aObserver

The image utility observer interface

CMdaServer* aServer = NULL

A pointer to a server object. The default is NULL which means that one is automatically constructed and owned by this conversion utility object. If not NULL, the client must construct, and be responsible for, the server object. This option may be more efficient if a number of conversion utility objects are to be created.

Return value

CMdaImageBitmapToBitmapUtility*

Pointer to the new instance of the bitmap to bitmap conversion utility.

[Top]


Opening


OpenL()

void OpenL(CFbsBitmap& aBitmap);

Description

Opens the existing source bitmap.

The function is asynchronous. When the open operation is complete, successfully or otherwise, the callback function MMdaImageUtilObserver::MiuoOpenComplete() is called.

The source bitmap must be open before any conversion operation can start.

Parameters

CFbsBitmap& aBitmap

The bitmap which is the source for the conversion operation.

[Top]


Conversion


ConvertL()

virtual void ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0);
virtual void ConvertL(CFbsBitmap& aBitmap,CFbsBitmap& aMaskBitmap,TInt aFrameNumber = 0);

Description

Begins the image conversion operation for the specified frame — overloaded function.

The operation is asynchronous. When the conversion operation is complete, successfully or otherwise, the callback function MMdaImageUtilObserver::MiuoConvertComplete() is called.

Parameters

CFbsBitmap& aBitmap

A reference to the bitmap which is the target of the conversion operation.

CFbsBitmap& aMaskBitmap

The overloaded variant which takes this argument is not supported for bitmap to bitmap conversion. This variant leaves with KErrNotSupported.

TInt aFrameNumber = 0

The frame number. This value is relative to zero.


CancelConvertL()

virtual void CancelConvertL();

Description

Cancels the conversion operation. The callback function MMdaImageUtilObserver::MiuoConvertComplete() is not called.

[Top]


Closing


Close()

virtual void Close();

Description

Closes the open bitmaps.

Any conversion operation in progress is cancelled.