initializing a descriptor

Login to reply to this topic.
Sat, 2005-04-09 13:38
Joined: 2004-11-01
Forum posts: 4
Hi,
I am trying to use the CMdaImageBitmapToDescUtility to convert an image from CFbBitmap to a descriptor, My problem is that I can't initialised the descriptor correctly... when I run the program it doesn't give any error but the value of the descriptor seems to be not set (checked it while debugging). Can any one give me an example of how to initialise the descriptor in order to be used to store the value of the bitmap correctly and I want to keep this value in order to be able to convert it back to CFbBitmap using CMdaImageDescToBitmapUtility.

Regards,
murmur

Tue, 2005-08-02 08:13
Joined: 2004-12-23
Forum posts: 239
Re: initializing a descriptor
Hi Murmur
have u resolved ur problem.If yes can u share ur experiences here.
Hoping for reply
Thanks

---------------
Bhatt Kavita

Tue, 2005-08-02 17:36
Joined: 2005-08-02
Forum posts: 6
Re: initializing a descriptor
Try,

class Converter: public MMdaImageUtilObserver{}

void Converter::Test(CFbsBitmap& aBitmap)
     {
     
     const TSize size = aBitmap.SizeInPixels();

     // 24 bits per pixel bitmap

     const TInt descSize = (size.iWidth * size.iHeight * 3) + 1024;

     HBufC8* descBuffer = HBufC8::NewMaxLC(descSize);
     TPtr8 descPtr(descBuffer->Des());

     TMdaBmpClipFormat clipformat;
     TMda24BppBmpCodec codec;

     CMdaImageBitmapToDescUtility* util = CMdaImageBitmapToDescUtility::NewL(*this);
     CleanupStack::PushL(util);

     util->CreateL(descPtr,&clipformat,&codec,NULL);
     CActiveScheduler::Start();

     util->ConvertL(aBitmap);
     CActiveScheduler::Start();

     CleanupStack::PopAndDestroy(2);
     }


void Converter::MiuoCreateComplete(TInt aError)
     {CActiveScheduler::Stop();}

void Converter::MiuoOpenComplete(TInt aError)
     {CActiveScheduler::Stop();}

void Converter::MiuoConvertComplete(TInt aError)
     {CActiveScheduler::Stop();}
Wed, 2005-08-03 11:26
Joined: 2004-12-23
Forum posts: 239
Re: initializing a descriptor
Thanks for your help
how it could be furnished for sdk 2.1
can u help me
TIA

---------------
Bhatt Kavita

  • Login to reply to this topic.