CFbsBitmap::StoreL

Login to reply to this topic.
Wed, 2006-11-08 18:37
Joined: 2006-10-17
Forum posts: 85
Hi,

I probably have a petty question:
I'm trying to use CFbsBitmap::StoreL function to create a mbm file, but I 'm not able to understand why my StoreL function declaration doesn't match with CFbsBitmap::StoreL declaration

StoreL declaration:
Code:
CFbsBitmap::StoreL(const TDesC &aFilename, TInt aNumSources, const TDesC *aSources[], TInt32 aSourceIds[]);

My code:
Code:
_LIT(mbmfile,"C:\\mbmfile.mbm");
const TBufC<14> *aSource[8];
TInt32 aSourceIds[8];
TInt FrameNum=ImageDecoder->FrameCount();
CFbsBitmap::StoreL(mbmfile, FrameNum, aSource, aSourceIds);    Here I've a "doesn't match" error compiling 

Thanks in advance for any help!

Thu, 2006-11-09 13:55
Joined: 2004-11-29
Forum posts: 1233
Re: CFbsBitmap::StoreL
The problem is that TBufC doesn't inherit from TDesC as one would expect.

youd need an array of TDesC* in some way.

I'm not sure really what StoreL expects in that array, maybe you can use RBuf instead.

But that is the reason for the compilation error at least.
Thu, 2006-11-09 18:15
Joined: 2006-10-17
Forum posts: 85
Re: CFbsBitmap::StoreL
Hi alh,
I've tried to use RBuf16 which, in effect, inherit from TDesC and in the sdk is specified that it can be passed to any function that is prototyped to take a TDesC16 type (like StoreL), but I always have the same problem compiling
Code:
_LIT(frame1, "C:\\frame1.bmp");
...
_LIT(frame8, "C:\\frame8.bmp");
RBuf16 aSourceBuffer[8];
aSourceBuffer[0].Create(frame1);
...
aSourceBuffer[7].Create(frame8);
const RBuf16 *aSource[8];
aSource[0]=&aSourceBuffer[0];
...
aSource[7]=&aSourceBuffer[7];
TInt32 aSourceIds[8];
TInt FrameNum=ImageDecoder->FrameCount();
_LIT(mbmfile,"C:\\mbmfile.mbm");
CFbsBitmap::StoreL(mbmfile, FrameNum, aSource, aSourceIds);
... if somebody can help me
Thanks
Fri, 2006-11-10 09:02
Joined: 2003-12-05
Forum posts: 672
Re: CFbsBitmap::StoreL
How about:

Code:
_LIT(mbmfile,"C:\\mbmfile.mbm");
const TBufC<14> aSource[8];
TInt32 aSourceIds[8];
TInt FrameNum=ImageDecoder->FrameCount();
CFbsBitmap::StoreL(mbmfile, FrameNum, &aSource, aSourceIds);
Fri, 2006-11-10 09:48
Joined: 2006-10-17
Forum posts: 85
Re: CFbsBitmap::StoreL
Hi Andreas,

I tried but the there's the same problem too!!!
I also tried with RBuf16 like :

Code:
const RBuf16 aSource[8];
_LIT(mbmfile,"C:\\mbmfile.mbm");
TInt32 aSourceIds[8];
TInt FrameNum=ImageDecoder->FrameCount();
CFbsBitmap::StoreL(mbmfile, FrameNum, &aSource, aSourceIds);    Here I've a "doesn't match" error compiling

... but nothing  Angry
I' m on the horns of a dilemma!!!
Fri, 2006-11-10 09:54
Joined: 2003-12-05
Forum posts: 672
Re: CFbsBitmap::StoreL
Fri, 2006-11-10 11:15
Joined: 2006-10-17
Forum posts: 85
Re: CFbsBitmap::StoreL
Thank you very much Andreas, now it's ok!!!!  Grin

Bye, Luca
Thu, 2007-06-21 06:48
Joined: 2006-03-06
Forum posts: 106
Re: CFbsBitmap::StoreL

hi Luca

Please tell me how i can pass the parameters to CFbsBitmap::StoreL() function specially const TDesC *aSources[].

regards
Himanshu

Thu, 2007-07-12 04:17
Joined: 2004-05-21
Forum posts: 286
Re: CFbsBitmap::StoreL

I donno whether you are still looking for solution. if you are, then out this link http://discussion.forum.nokia.com/forum/archive/index.php/t-72040.html

Cheers,
Sri

Mon, 2007-07-23 11:17
Joined: 2006-10-17
Forum posts: 85
Re: CFbsBitmap::StoreL

This is the solution:

CFbsBitmap::StoreL(mbmfile, 8, (const TDesC16**)aSource, aSourceIds);

Cheers

  • Login to reply to this topic.