CImageReadCodec Class Reference

class CImageReadCodec : public CBase

Provides read related processing functions for bitmaps.

Note: For use by plugin writers only.

Inherits from

Constructor & Destructor Documentation

CImageReadCodec()

IMPORT_CCImageReadCodec()[protected]

Default constructor.

~CImageReadCodec()

IMPORT_C~CImageReadCodec()

Destructor.

Member Functions Documentation

ClearBitmapL(CFbsBitmap &, TRgb)

IMPORT_C voidClearBitmapL(CFbsBitmap &aBitmap,
TRgbaColor
)[protected]

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

Parameters

CFbsBitmap & aBitmapA reference to a fully constructed bitmap.
TRgb aColorThe color to use for painting.

Complete()

IMPORT_C voidComplete()[virtual]

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.

ConstructL()

IMPORT_C voidConstructL()[protected]

Second phase constructor.

CurrentFrame()

IMPORT_C TIntCurrentFrame()const [protected]

Return the current frame number

GetNewDataPosition(TInt &, TInt &)

IMPORT_C voidGetNewDataPosition(TInt &aPosition,
TInt &aLength
)[virtual]

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 & aPositionA reference to the returned new position.
TInt & aLengthA reference to the number of bytes to read.

InitFrameHeader(TFrameInfo &, CFrameImageData &)

IMPORT_C voidInitFrameHeader(TFrameInfo &aFrameInfo,
CFrameImageData &aFrameData
)[virtual]

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 & aFrameInfoA reference to a TFrameInfo object which will contain the current frame's header info
CFrameImageData & aFrameDataA reference to a TFrameInfo object which will contain the current frame's header data

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

voidInitFrameL(TFrameInfo &aFrameInfo,
CFrameImageData &aFrameImageData,
TBoolaDisableErrorDiffusion,
CFbsBitmap &aDestination,
CFbsBitmap *aDestinationMask
)[pure virtual]

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 & aFrameInfoA reference to a TFrameInfo object.
CFrameImageData & aFrameImageDataA reference to a CFrameImageData object.
TBool aDisableErrorDiffusionA flag indicating whether error diffusion should be disabled.
CFbsBitmap & aDestinationThe destination bitmap.
CFbsBitmap * aDestinationMaskThe destination mask bitmap.

ProcessFrameHeaderL(TBufPtr8 &)

IMPORT_C TFrameStateProcessFrameHeaderL(TBufPtr8 &aData)[virtual]

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 & aDataA reference to a TBufPtr8 that contains the frame data.

ProcessFrameL(TBufPtr8 &)

TFrameState ProcessFrameL(TBufPtr8 &aSrc)[pure virtual]

Processes the frame data contained in aSrc.

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

Parameters

TBufPtr8 & aSrcA reference to the buffer containing the frame data.

ReducedSize(const TSize &, TInt, TSize &)

IMPORT_C TIntReducedSize(const TSize &aOriginalSize,
TIntaReductionFactor,
TSize &aReducedSize
)const [virtual]

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 & aOriginalSizeA reference to the original size of an image.
TInt aReductionFactor
TSize & aReducedSizeA reference to the new size of an image.

ReductionFactor(const TSize &, const TSize &)

IMPORT_C TIntReductionFactor(const TSize &aOriginalSize,
const TSize &aReducedSize
)const [virtual]

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 & aOriginalSizeA reference to the original size of an image.
const TSize & aReducedSizeA reference to the new size of an image.

ReservedVirtual1()

IMPORT_C voidReservedVirtual1()[private, virtual]

Intended for future proofing - will panic if called

panic
ImageConversion 30

ReservedVirtual2()

IMPORT_C voidReservedVirtual2()[private, virtual]

Intended for future proofing - will panic if called

panic
ImageConversion 30

ReservedVirtual3()

IMPORT_C voidReservedVirtual3()[private, virtual]

Intended for future proofing - will panic if called

panic
ImageConversion 30

ReservedVirtual4()

IMPORT_C voidReservedVirtual4()[private, virtual]

Intended for future proofing - will panic if called

panic
ImageConversion 30

SetCurrentFrame(TInt)

voidSetCurrentFrame(TIntaFrameNumber)

Sets the current frame number. Called by the framework before InitFrameHeader() and InitFrameL()

Parameters

TInt aFrameNumberThe current frame number

Member Data Documentation

TInt iCurrentFrame

TInt iCurrentFrame[private]