Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <ImageCodec.h>
Link against: imageconversion.lib

Class CImageReadCodec

class CImageReadCodec : public CBase;

Description

Provides read related processing functions for bitmaps.

Note: For use by plugin writers only.

Derivation

Members

Defined in CImageReadCodec:

Inherited from CBase:


Construction and destruction


~CImageReadCodec()

IMPORT_C ~CImageReadCodec();

Description

Destructor.


CImageReadCodec()

protected: IMPORT_C CImageReadCodec();

Description

Default constructor.


ConstructL()

protected: IMPORT_C void ConstructL();

Description

Second phase constructor.

[Top]


Member functions


InitFrameL(TFrameInfo &,CFrameImageData &,TBool,CFbsBitmap &,CFbsBitmap *)

virtual void InitFrameL(TFrameInfo &aFrameInfo, CFrameImageData &aFrameImageData, TBool aDisableErrorDiffusion, CFbsBitmap &aDestination, CFbsBitmap *aDestinationMask)=0;

Description

Performs initial processing of image data and mask bitmaps.

This function processes the image frame using data supplied in aFrameInfo, aFrameImageData and using the flag aDisableErrorDiffusion. Not all codecs are expected to make use of all fields.

This is a virtual function that each derived class must implement.

Parameters

TFrameInfo &aFrameInfo

A reference to a TFrameInfo object.

CFrameImageData &aFrameImageData

A reference to a CFrameImageData object.

TBool aDisableErrorDiffusion

A flag indicating whether error diffusion should be disabled.

CFbsBitmap &aDestination

The destination bitmap.

CFbsBitmap *aDestinationMask

The destination mask bitmap.


InitFrameHeader(TFrameInfo &,CFrameImageData &)

IMPORT_C virtual void InitFrameHeader(TFrameInfo &aFrameInfo, CFrameImageData &aFrameData);

Description

Used to initialise the frame header data structures.

The default version of this function does nothing. It should be implemented by the codec to at least update the appropriate processing state of the current frame using its TFrameInfo structure.

Parameters

TFrameInfo &aFrameInfo

A reference to a TFrameInfo object which will contain the current frame's header info

CFrameImageData &aFrameData

A reference to a TFrameInfo object which will contain the current frame's header data


ProcessFrameHeaderL(TBufPtr8 &)

IMPORT_C virtual TFrameState ProcessFrameHeaderL(TBufPtr8 &aData);

Description

Processes the header for one frame.

The default version of this function and simply returns EFrameComplete. It should be implemented by the codec to at least update the appropriate processing state of the current frame using its TFrameInfo structure.

Parameters

TBufPtr8 &aData

A reference to a TBufPtr8 that contains the frame data.

Return value

TFrameState

The completion status of this frame's processing


Complete()

IMPORT_C virtual void Complete();

Description

Processes/displays converted image data.

This function is called on frame completion and on underflow. The default version of this function does nothing. It should be implemented by the codec if required.

If it is called on underflow for example, it can enable display of a partially decoded image. In such cases this function could display all the image data up to the point of the underflow.


GetNewDataPosition(TInt &,TInt &)

IMPORT_C virtual void GetNewDataPosition(TInt &aPosition, TInt &aLength);

Description

Returns a new position and number of bytes to read for the data stream.

The default version of this function does nothing. It should be implemented by the codec, if required.

Parameters

TInt &aPosition

A reference to the returned new position.

TInt &aLength

A reference to the number of bytes to read.


ProcessFrameL(TBufPtr8 &)

virtual TFrameState ProcessFrameL(TBufPtr8 &aSrc)=0;

Description

Processes the frame data contained in aSrc.

This is a pure virtual function that each derived class must implement.

Parameters

TBufPtr8 &aSrc

A reference to the buffer containing the frame data.

Return value

TFrameState

The current frame state after processing.


ReductionFactor(const TSize &,const TSize &)const

IMPORT_C virtual TInt ReductionFactor(const TSize &aOriginalSize, const TSize &aReducedSize) const;

Description

Calculates reduction factor based on the input parameters. The default Implementation is given here. It should be implemented by the Codecs, If required.

Parameters

const TSize &aOriginalSize

A reference to the original size of an image.

const TSize &aReducedSize

A reference to the new size of an image.

Return value

TInt

The reduction factor.


ReducedSize(const TSize &,TInt,TSize &)const

IMPORT_C virtual TInt ReducedSize(const TSize &aOriginalSize, TInt aReductionFactor, TSize &aReducedSize) const;

Description

Calculates reduced size of the decoded bitmap based on the input parameters and updates aReducedSize with this value. The default Implementation is given here. It should be implemented by the Codecs, If required.

Parameters

const TSize &aOriginalSize

A reference to the original size of an image.

TInt aReductionFactor

TSize &aReducedSize

A reference to the new size of an image.

Return value

TInt

An error code indicating if the function call was successful. KErrNone on success, otherwise KErrArgument


ClearBitmapL(CFbsBitmap &,TRgb)

protected: IMPORT_C void ClearBitmapL(CFbsBitmap &aBitmap, TRgb aColor);

Description

Paints the entire bitmap aBitmap with the color supplied as aColor.

Parameters

CFbsBitmap &aBitmap

A reference to a fully constructed bitmap.

TRgb aColor

The color to use for painting.


CurrentFrame()const

protected: IMPORT_C TInt CurrentFrame() const;

Description

Return the current frame number

Return value

TInt

The current frame number


ReservedVirtual1()

private: IMPORT_C virtual void ReservedVirtual1();

Description

Intended for future proofing - will panic if called

Panic codes

EReservedCall


ReservedVirtual2()

private: IMPORT_C virtual void ReservedVirtual2();

Description

Intended for future proofing - will panic if called

Panic codes

EReservedCall


ReservedVirtual3()

private: IMPORT_C virtual void ReservedVirtual3();

Description

Intended for future proofing - will panic if called

Panic codes

EReservedCall


ReservedVirtual4()

private: IMPORT_C virtual void ReservedVirtual4();

Description

Intended for future proofing - will panic if called

Panic codes

EReservedCall