#include <icl/imagecodec.h>
Link against: imageconversion.lib
class CImageReadCodec : public CBase |
Public Member Functions | |
---|---|
~CImageReadCodec() | |
virtual IMPORT_C void | Complete() |
virtual IMPORT_C void | GetNewDataPosition(TInt &, TInt &) |
virtual IMPORT_C void | InitFrameHeader(TFrameInfo &, CFrameImageData &) |
pure virtual void | InitFrameL(TFrameInfo &, CFrameImageData &, TBool, CFbsBitmap &, CFbsBitmap *) |
virtual IMPORT_C TFrameState | ProcessFrameHeaderL(TBufPtr8 &) |
pure virtual TFrameState | ProcessFrameL(TBufPtr8 &) |
virtual IMPORT_C TInt | ReducedSize(const TSize &, TInt, TSize &) |
virtual IMPORT_C TInt | ReductionFactor(const TSize &, const TSize &) |
void | SetCurrentFrame(TInt) |
Protected Member Functions | |
---|---|
CImageReadCodec() | |
IMPORT_C void | ClearBitmapL(CFbsBitmap &, TRgb) |
IMPORT_C void | ConstructL() |
IMPORT_C TInt | CurrentFrame() |
Provides read related processing functions for bitmaps.
Note: For use by plugin writers only.
IMPORT_C void | ClearBitmapL | ( | CFbsBitmap & | aBitmap, |
TRgb | aColor | |||
) | [protected] |
Paints the entire bitmap aBitmap with the color supplied as aColor.
Parameters | |
---|---|
aBitmap | A reference to a fully constructed bitmap. |
aColor | The color to use for painting. |
IMPORT_C void | Complete | ( | ) | [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.
IMPORT_C TInt | CurrentFrame | ( | ) | const [protected] |
Return the current frame number
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 | |
---|---|
aPosition | A reference to the returned new position. |
aLength | A reference to the number of bytes to read. |
IMPORT_C void | InitFrameHeader | ( | 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 | |
---|---|
aFrameInfo | A reference to a TFrameInfo object which will contain the current frame's header info |
aFrameData | A reference to a TFrameInfo object which will contain the current frame's header data |
void | InitFrameL | ( | TFrameInfo & | aFrameInfo, |
CFrameImageData & | aFrameImageData, | |||
TBool | aDisableErrorDiffusion, | |||
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 | |
---|---|
aFrameInfo | A reference to a TFrameInfo object. |
aFrameImageData | A reference to a CFrameImageData object. |
aDisableErrorDiffusion | A flag indicating whether error diffusion should be disabled. |
aDestination | The destination bitmap. |
aDestinationMask | The destination mask bitmap. |
IMPORT_C TFrameState | ProcessFrameHeaderL | ( | 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 | |
---|---|
aData | A reference to a TBufPtr8 that contains the frame data. |
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 | |
---|---|
aSrc | A reference to the buffer containing the frame data. |
IMPORT_C TInt | ReducedSize | ( | const TSize & | aOriginalSize, |
TInt | aReductionFactor, | |||
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 | |
---|---|
aOriginalSize | A reference to the original size of an image. |
aReducedSize | A reference to the new size of an image. |
Calculates reduction factor based on the input parameters. The default Implementation is given here. It should be implemented by the Codecs, If required.
Parameters | |
---|---|
aOriginalSize | A reference to the original size of an image. |
aReducedSize | A reference to the new size of an image. |
void | SetCurrentFrame | ( | TInt | aFrameNumber | ) |
Sets the current frame number. Called by the framework before InitFrameHeader() and InitFrameL()
Parameters | |
---|---|
aFrameNumber | The current frame number |