CImageEncoder Class Reference

class CImageEncoder : public CBase

Provides access to the ICL (image conversion library) encoders.

This class provides functions that convert image data held in CFbsBitmap objects into well know formats and store the results in either files of descriptors.

Inherits from

Public Member Functions
~CImageEncoder()
IMPORT_C TImageConvStreamedEncode *BlockStreamerL()
IMPORT_C voidCancel()
IMPORT_C voidConvert(TRequestStatus *, const CFbsBitmap &, const CFrameImageData *)
IMPORT_C CImageEncoder *DataNewL(HBufC8 *&, const TDesC8 &, const TOptions)
IMPORT_C CImageEncoder *DataNewL(HBufC8 *&, const TOptions, const TUid, const TUid, const TUid)
IMPORT_C CImageEncoder *FileNewL(RFs &, const TDesC &, const TDesC8 &, const TOptions)
IMPORT_C CImageEncoder *FileNewL(RFs &, const TDesC &, const TOptions, const TUid, const TUid, const TUid)
IMPORT_C CImageEncoder *FileNewL(RFile &, const TDesC8 &, const TOptions)
IMPORT_C CImageEncoder *FileNewL(RFile &, const TOptions, const TUid, const TUid, const TUid)
IMPORT_C voidGetFileTypesL(RFileExtensionMIMETypeArray &)
IMPORT_C voidGetImageSubTypesL(const TUid, RImageTypeDescriptionArray &)
IMPORT_C voidGetImageTypesL(RImageTypeDescriptionArray &)
IMPORT_C voidGetInterfaceImplementationsL(const RUidDataArray &, RUidDataArray &)
IMPORT_C voidGetInterfaceImplementationsL(const TUid *, const TInt, RUidDataArray &)
IMPORT_C voidGetPluginPropertiesL(const TUid, RUidDataArray &)
IMPORT_C TUidImplementationUid()
IMPORT_C TImageConvOperation *OperationL()
IMPORT_C voidPrepare(TRequestStatus *)
IMPORT_C TIntSetEncoderThreadPriority(TThreadPriority)
IMPORT_C voidSetThumbnail(TBool)
Protected Member Functions
CImageEncoder()
IMPORT_C voidCustomAsync(TRequestStatus *, TInt)
IMPORT_C voidCustomSyncL(TInt)
IMPORT_C CImageEncoderPlugin *Plugin()
Private Member Functions
voidImageTypeGetEncoderListL(RImplInfoPtrArray &, const TUid, const TUid, const TUid, const TOptions)
voidMimeTypeGetEncoderListL(RImplInfoPtrArray &, const TDesC8 &, const TOptions)
CImageEncodeConstruct *NewEncodeConstructL(const CImplementationInformation &, const TOptions)
CImageEncoder *NewL(CImageEncodeConstruct *, TOptions)
CImageEncoder *NewL()
IMPORT_C voidReservedVirtual1()
IMPORT_C voidReservedVirtual2()
IMPORT_C voidReservedVirtual3()
IMPORT_C voidReservedVirtual4()
TBool ValidProperties()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTOptions {
EOptionNone = 0x00, EOptionAlwaysThread = 0x01, EOptionGenerateAdaptivePalette = 0x02, EPreferFastEncode = 0x04, EOptionExtStream = 0x0100, EOptionExtRotation = 0x0200, EOptionExtMirrorHorizontalAxis = 0x0400, EOptionExtMirrorVerticalAxis = 0x0800, EOptionExtUseWithSetThumbnail = 0x1000, EOptionExtReserved1 = 0x2000, EOptionExtReserved2 = 0x4000, EOptionExtReserved3 = 0x8000
}
Private Attributes
MImageEncoderRelay *iRelay

Constructor & Destructor Documentation

CImageEncoder()

IMPORT_CCImageEncoder()[protected]

~CImageEncoder()

IMPORT_C~CImageEncoder()[virtual]

Member Functions Documentation

BlockStreamerL()

IMPORT_C TImageConvStreamedEncode *BlockStreamerL()

Cancel()

IMPORT_C voidCancel()

Convert(TRequestStatus *, const CFbsBitmap &, const CFrameImageData *)

IMPORT_C voidConvert(TRequestStatus *aRequestStatus,
const CFbsBitmap &aSource,
const CFrameImageData *aFrameImageData = NULL
)

Parameters

TRequestStatus * aRequestStatus
const CFbsBitmap & aSource
const CFrameImageData * aFrameImageData = NULL

CustomAsync(TRequestStatus *, TInt)

IMPORT_C voidCustomAsync(TRequestStatus *aRequestStatus,
TIntaParam
)[protected]

Parameters

TRequestStatus * aRequestStatus
TInt aParam

CustomSyncL(TInt)

IMPORT_C voidCustomSyncL(TIntaParam)[protected]

Parameters

TInt aParam

DataNewL(HBufC8 *&, const TDesC8 &, const TOptions)

IMPORT_C CImageEncoder *DataNewL(HBufC8 *&aDestinationData,
const TDesC8 &aMIMEType,
const TOptionsaOptions = EOptionNone
)[static]

Parameters

HBufC8 *& aDestinationData
const TDesC8 & aMIMEType
const TOptions aOptions = EOptionNone

DataNewL(HBufC8 *&, const TOptions, const TUid, const TUid, const TUid)

IMPORT_C CImageEncoder *DataNewL(HBufC8 *&aDestinationData,
const TOptionsaOptions = EOptionNone,
const TUidaImageType = KNullUid,
const TUidaImageSubType = KNullUid,
const TUidaEncoderUid = KNullUid
)[static]

Parameters

HBufC8 *& aDestinationData
const TOptions aOptions = EOptionNone
const TUid aImageType = KNullUid
const TUid aImageSubType = KNullUid
const TUid aEncoderUid = KNullUid

FileNewL(RFs &, const TDesC &, const TDesC8 &, const TOptions)

IMPORT_C CImageEncoder *FileNewL(RFs &aFs,
const TDesC &aDestinationFilename,
const TDesC8 &aMIMEType,
const TOptionsaOptions = EOptionNone
)[static]

Parameters

RFs & aFs
const TDesC & aDestinationFilename
const TDesC8 & aMIMEType
const TOptions aOptions = EOptionNone

FileNewL(RFs &, const TDesC &, const TOptions, const TUid, const TUid, const TUid)

IMPORT_C CImageEncoder *FileNewL(RFs &aFs,
const TDesC &aDestinationFilename,
const TOptionsaOptions = EOptionNone,
const TUidaImageType = KNullUid,
const TUidaImageSubType = KNullUid,
const TUidaEncoderUid = KNullUid
)[static]

Parameters

RFs & aFs
const TDesC & aDestinationFilename
const TOptions aOptions = EOptionNone
const TUid aImageType = KNullUid
const TUid aImageSubType = KNullUid
const TUid aEncoderUid = KNullUid

FileNewL(RFile &, const TDesC8 &, const TOptions)

IMPORT_C CImageEncoder *FileNewL(RFile &aFile,
const TDesC8 &aMIMEType,
const TOptionsaOptions = EOptionNone
)[static]

Parameters

RFile & aFile
const TDesC8 & aMIMEType
const TOptions aOptions = EOptionNone

FileNewL(RFile &, const TOptions, const TUid, const TUid, const TUid)

IMPORT_C CImageEncoder *FileNewL(RFile &aFile,
const TOptionsaOptions = EOptionNone,
const TUidaImageType = KNullUid,
const TUidaImageSubType = KNullUid,
const TUidaEncoderUid = KNullUid
)[static]

Parameters

RFile & aFile
const TOptions aOptions = EOptionNone
const TUid aImageType = KNullUid
const TUid aImageSubType = KNullUid
const TUid aEncoderUid = KNullUid

GetFileTypesL(RFileExtensionMIMETypeArray &)

IMPORT_C voidGetFileTypesL(RFileExtensionMIMETypeArray &aFileExtensionArray)[static]

Parameters

RFileExtensionMIMETypeArray & aFileExtensionArray

GetImageSubTypesL(const TUid, RImageTypeDescriptionArray &)

IMPORT_C voidGetImageSubTypesL(const TUidaImageType,
RImageTypeDescriptionArray &aSubTypeArray
)[static]

Parameters

const TUid aImageType
RImageTypeDescriptionArray & aSubTypeArray

GetImageTypesL(RImageTypeDescriptionArray &)

IMPORT_C voidGetImageTypesL(RImageTypeDescriptionArray &aImageTypeArray)[static]

Parameters

RImageTypeDescriptionArray & aImageTypeArray

GetInterfaceImplementationsL(const RUidDataArray &, RUidDataArray &)

IMPORT_C voidGetInterfaceImplementationsL(const RUidDataArray &aRequiredUids,
RUidDataArray &aImplArray
)[static]

Parameters

const RUidDataArray & aRequiredUids
RUidDataArray & aImplArray

GetInterfaceImplementationsL(const TUid *, const TInt, RUidDataArray &)

IMPORT_C voidGetInterfaceImplementationsL(const TUid *aRequiredUids,
const TIntaLength,
RUidDataArray &aImplArray
)[static]

Parameters

const TUid * aRequiredUids
const TInt aLength
RUidDataArray & aImplArray

GetPluginPropertiesL(const TUid, RUidDataArray &)

IMPORT_C voidGetPluginPropertiesL(const TUidaImplementationUid,
RUidDataArray &aPropertiesArray
)[static]

Parameters

const TUid aImplementationUid
RUidDataArray & aPropertiesArray

ImageTypeGetEncoderListL(RImplInfoPtrArray &, const TUid, const TUid, const TUid, const TOptions)

voidImageTypeGetEncoderListL(RImplInfoPtrArray &aEncoderList,
const TUidaImageType,
const TUidaImageSubType,
const TUidaEncoderUid,
const TOptionsaOptions = EOptionNone
)[private, static]

Parameters

RImplInfoPtrArray & aEncoderList
const TUid aImageType
const TUid aImageSubType
const TUid aEncoderUid
const TOptions aOptions = EOptionNone

ImplementationUid()

IMPORT_C TUidImplementationUid()const

MimeTypeGetEncoderListL(RImplInfoPtrArray &, const TDesC8 &, const TOptions)

voidMimeTypeGetEncoderListL(RImplInfoPtrArray &aEncoderList,
const TDesC8 &aMIMEType,
const TOptionsaOptions = EOptionNone
)[private, static]

Parameters

RImplInfoPtrArray & aEncoderList
const TDesC8 & aMIMEType
const TOptions aOptions = EOptionNone

NewEncodeConstructL(const CImplementationInformation &, const TOptions)

CImageEncodeConstruct *NewEncodeConstructL(const CImplementationInformation &aEncoderInfo,
const TOptionsaOptions = EOptionNone
)[private, static]

Parameters

const CImplementationInformation & aEncoderInfo
const TOptions aOptions = EOptionNone

NewL(CImageEncodeConstruct *, TOptions)

CImageEncoder *NewL(CImageEncodeConstruct *aConstruct,
TOptionsaOptions
)[private, static]

Parameters

CImageEncodeConstruct * aConstruct
TOptions aOptions

NewL()

CImageEncoder *NewL()[private, static]

OperationL()

IMPORT_C TImageConvOperation *OperationL()

Plugin()

IMPORT_C CImageEncoderPlugin *Plugin()const [protected]

Prepare(TRequestStatus *)

IMPORT_C voidPrepare(TRequestStatus *aRequestStatus)

Parameters

TRequestStatus * aRequestStatus

ReservedVirtual1()

IMPORT_C voidReservedVirtual1()[private, virtual]

ReservedVirtual2()

IMPORT_C voidReservedVirtual2()[private, virtual]

ReservedVirtual3()

IMPORT_C voidReservedVirtual3()[private, virtual]

ReservedVirtual4()

IMPORT_C voidReservedVirtual4()[private, virtual]

SetEncoderThreadPriority(TThreadPriority)

IMPORT_C TIntSetEncoderThreadPriority(TThreadPriorityaPriority)

Parameters

TThreadPriority aPriority

SetThumbnail(TBool)

IMPORT_C voidSetThumbnail(TBoolaDoGenerateThumbnail)

Parameters

TBool aDoGenerateThumbnail

ValidProperties()

TBool ValidProperties()const [private, inline]

Member Enumerations Documentation

Enum TOptions

Flags to control how the image is encoded. These can be combined using an OR operation.

Enumerators

EOptionNone = 0x00

No flag set

EOptionAlwaysThread = 0x01

Perform the encoding in a separate thread

EOptionGenerateAdaptivePalette = 0x02

If the codec supports it, generate a palette based on the colors present in the image data, rather than using the default palette

EPreferFastEncode = 0x04

Use the highest possible image encoding speed; this may result in lower image quality. This flag is more applicable to formats which use "lossy" compression algorithms, such as JPEG. Decoders that do not support fast encoding will ignore it.

EOptionExtStream = 0x0100

Codec must support block streaming extension.

EOptionExtRotation = 0x0200

Codec must support rotation through the operation extension.

EOptionExtMirrorHorizontalAxis = 0x0400

Codec must support horizontal mirror through the operation extension.

EOptionExtMirrorVerticalAxis = 0x0800

Codec must support vertical mirror through the operation extension.

EOptionExtUseWithSetThumbnail = 0x1000

Codec must support setting thumbnail when using the other extensions (e.g. thumbnail rotation)

EOptionExtReserved1 = 0x2000

Reserved.

EOptionExtReserved2 = 0x4000

Reserved.

EOptionExtReserved3 = 0x8000

Reserved.

Member Data Documentation

MImageEncoderRelay * iRelay

MImageEncoderRelay *iRelay[private]