|
|
User login
Feeds |
initializing a descriptor
|
|||||
| Sat, 2005-04-09 13:38 | |
|
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 |
|
Forum posts: 239
have u resolved ur problem.If yes can u share ur experiences here.
Hoping for reply
Thanks
---------------
Bhatt Kavita
Forum posts: 6
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();}
Forum posts: 239
how it could be furnished for sdk 2.1
can u help me
TIA
---------------
Bhatt Kavita