|
||
class CBufferedImageDecoder : public CBase;
Buffered image conversion library.
Provides a wrapper arround CImageDecoder
that enables you to decode multiple images without having to recreate the CBufferedImageDecoder object each time. One of
the key features of this class is the ability to append image data to the decoder object as it becomes available; this is
done using CBufferedImageDecoder::AppendDataL(const TDesC8 &)
.
CBase
-
Base class for all classes to be instantiated on the heap.
CBufferedImageDecoder
-
Buffered image conversion library.
Defined in CBufferedImageDecoder
:
AppendDataL(const TDesC8 &)
Adds new image data.Cancel()
Requests an asynchronous decode to terminate.ContinueConvert(TRequestStatus *)
Continues decoding a frame and/or mask after new image data was added to the sou...ContinueOpenL()
Call this function to retry to create a decoder after CBufferedImageDecoder::Ope...ContinueProcessingHeaderL()
Continues processing image headers after new image data was appended.Convert(TRequestStatus *,CFbsBitmap &,CFbsBitmap &,TInt)
Starts decoding an image frame and mask asynchronously.Convert(TRequestStatus *,CFbsBitmap &,TInt)
Starts decoding an image frame asynchronously.FrameCommentL(TInt,TInt)const
Returns a particular comment attached to a given frame of the image. Ownership o...FrameCount()const
Returns the number of frames in the image being decoded. This function can be ca...FrameData(TInt)const
Returns the image data for a specific frame.FrameInfo(TInt)const
Returns the frame info for a specified frame of the image.FrameInfoStringsL(TInt)
Returns the formatted frame information strings for a specific frame.FrameInfoStringsLC(TInt)
Returns the formatted frame information strings for a specific frame and leave i...ImageCommentL(TInt)const
Returns a particular comment attached to the image. Ownership of the returned bu...ImplementationUid()const
Returns the implementation UID of the decoder being used to decode the image.IsImageHeaderProcessingComplete()const
Returns the status of the image.NewL(RFs &)
Creates a buffered decoder.NumberOfFrameComments(TInt)const
Returns the number of comments attached to a given frame of the image as opposed...NumberOfImageComments()const
Returns the number of comments attached to the image (as opposed to a particular...Reset()
Reset the decoder for reuse.ValidDecoder()const
Determine if enough data was available to determine which plugin decoder to use....~CBufferedImageDecoder()
Destructor for this class.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C static CBufferedImageDecoder* NewL(RFs &aFs);
Creates a buffered decoder.
The function leaves if the decoder object cannot be created or initialised.
|
|
IMPORT_C virtual ~CBufferedImageDecoder();
Destructor for this class.
Stops decoding if it is in progress and frees all resources owned by the object prior to its destruction.
IMPORT_C void OpenL(const TDesC8 &aSourceData, const TDesC8 &aMIMEType, const CImageDecoder::TOptions aOptions=CImageDecoder::EOptionNone);
Creates a decoder for the image in the source buffer. The client supplies a MIME type which will be used to try and select an appropriate plugin decoder. If it finds a decoder it creates it and then goes on to use that decoder to scan the beginning of the image file.
|
|
IMPORT_C void OpenL(const TDesC8 &aSourceData, const CImageDecoder::TOptions aOptions=CImageDecoder::EOptionNone, const TUid
aImageType=TUid::Null(), const TUid aImageSubType=TUid::Null(), const TUid aDecoderUid=TUid::Null());
Creates a decoder for the image in the source buffer.
If the client supplies an image type (and sub-type, if applicable) or decoder uid, these will be used to try and select an
appropriate plugin decoder. If not, then the selection will be done by matching the image header from the buffer. If it finds
a decoder it creates it and then goes on to use that decoder to scan the beginning of the image buffer. If a decoder could
not be created append data using CBufferedImageDecoder::AppendDataL(const TDesC8 &)
and call CBufferedImageDecoder::ContinueOpenL()
.
|
|
IMPORT_C void ContinueOpenL();
Call this function to retry to create a decoder after CBufferedImageDecoder::OpenL(const TDesC8 &,const TDesC8 &,const CImageDecoder::TOptions)
returned with KErrUnderFlow and extra data was added to the descriptor using CBufferedImageDecoder::AppendDataL(const TDesC8 &)
. This function can be recalled until CBufferedImageDecoder::ValidDecoder()const
return ETrue.
|
IMPORT_C void ContinueProcessingHeaderL();
Continues processing image headers after new image data was appended.
This function can be called until CBufferedImageDecoder::IsImageHeaderProcessingComplete()const
return ETrue.
IMPORT_C TBool IsImageHeaderProcessingComplete() const;
Returns the status of the image.
If the image is incomplete or not terminated correctly EFalse will be returned
|
IMPORT_C void Convert(TRequestStatus *aRequestStatus, CFbsBitmap &aDestination, TInt aFrameNumber=0);
Starts decoding an image frame asynchronously.
When converting the operation can complete with KErrUnderflow, if there is insufficient information in the descriptor. In
this situation, CBufferedImageDecoder::ContinueConvert(TRequestStatus *)
should be called repeatedly until the descriptor has accumulated enough information for CBufferedImageDecoder::ContinueConvert(TRequestStatus *)
to complete with KErrNone.
|
IMPORT_C void Convert(TRequestStatus *aRequestStatus, CFbsBitmap &aDestination, CFbsBitmap &aDestinationMask, TInt aFrameNumber=0);
Starts decoding an image frame and mask asynchronously.
When converting the operation can complete with KErrUnderflow, if there is insufficient information in the descriptor. In
this situation, CBufferedImageDecoder::ContinueConvert(TRequestStatus *)
should be called repeatedly until the descriptor has accumulated enough information for CBufferedImageDecoder::ContinueConvert(TRequestStatus *)
to complete with KErrNone.
|
IMPORT_C void ContinueConvert(TRequestStatus *aRequestStatus);
Continues decoding a frame and/or mask after new image data was added to the source file or descriptor and a previous call
to CBufferedImageDecoder::Convert(TRequestStatus *,CFbsBitmap &,TInt)
or CBufferedImageDecoder::ContinueConvert(TRequestStatus *)
returned KErrUnderflow.
|
IMPORT_C void Cancel();
Requests an asynchronous decode to terminate.
Cancels any conversions currently in progress.
IMPORT_C void Reset();
Reset the decoder for reuse.
Follow this call with CBufferedImageDecoder::OpenL(const TDesC8 &,const TDesC8 &,const CImageDecoder::TOptions)
and new source data.
IMPORT_C void AppendDataL(const TDesC8 &aData);
Adds new image data.
A copy of the data is held internally, and the caller does not need to retain the data.
|
IMPORT_C TInt FrameCount() const;
Returns the number of frames in the image being decoded. This function can be called immediately after the call to create the decoder, thus enabling the caller to know how many frames need to be converted.
|
IMPORT_C const TFrameInfo& FrameInfo(TInt aFrameNumber=0) const;
Returns the frame info for a specified frame of the image.
This function can be called immediately after the call to create the decoder, thus enabling the caller to know about each frame in advance of converting it.
|
|
IMPORT_C const CFrameImageData& FrameData(TInt aFrameNumber=0) const;
Returns the image data for a specific frame.
Use CBufferedImageDecoder::FrameCount()const
to determine how many frames are contained in the image before using this function.
|
|
IMPORT_C TInt NumberOfImageComments() const;
Returns the number of comments attached to the image (as opposed to a particular frame).
|
IMPORT_C HBufC* ImageCommentL(TInt aCommentNumber) const;
Returns a particular comment attached to the image. Ownership of the returned buffer is transferred to the caller.
Use CBufferedImageDecoder::NumberOfImageComments()const
to determine how many (if any) comments are contained within the image.
|
|
IMPORT_C TInt NumberOfFrameComments(TInt aFrameNumber) const;
Returns the number of comments attached to a given frame of the image as opposed to the whole image.
Use CBufferedImageDecoder::FrameCount()const
to retrieve the number of frames in the image to ensure that the value you use for aFrameNumber is valid.
|
|
IMPORT_C HBufC* FrameCommentL(TInt aFrameNumber, TInt aCommentNumber) const;
Returns a particular comment attached to a given frame of the image. Ownership of the returned buffer is transferred to the caller.
|
|
IMPORT_C CFrameInfoStrings* FrameInfoStringsLC(TInt aFrameNumber=0);
Returns the formatted frame information strings for a specific frame and leave it on the cleanup stack.
Ownership is transferred to the caller.
|
|
IMPORT_C CFrameInfoStrings* FrameInfoStringsL(TInt aFrameNumber=0);
Returns the formatted frame information strings for a specific frame.
Ownership is transferred to the caller.
|
|
IMPORT_C TUid ImplementationUid() const;
Returns the implementation UID of the decoder being used to decode the image.
|
IMPORT_C TBool ValidDecoder() const;
Determine if enough data was available to determine which plugin decoder to use. If this return EFalse append extra data using
CBufferedImageDecoder::AppendDataL(const TDesC8 &)
and and call CBufferedImageDecoder::ContinueOpenL()
|