Loading a bitmap

Login to reply to this topic.
Thu, 2008-07-31 04:49
Joined: 2008-03-18
Forum posts: 45

Hi all,

Can anyone tell me how to load a bitmap image in a particular position in the mobile scree.

Regards,
Sweta


NEWBIE OF SYMBIAN


Thu, 2008-07-31 05:16
Joined: 2007-06-16
Forum posts: 52
Re: Loading a bitmap

Hi..

first load the bitmap

iBitmap = iEikonEnv->CreateBitmapL( mbmpath,0 );

then draw the bitmap

CWindowGc& gc = SystemGc();
gc.Clear(aRect);
gc.DrawBitmap(TRect(TPoint(0,0), TSize(100,100)), iBitmap);

ThanX&Regards
vijay


ready to face

Thu, 2008-07-31 05:33
Joined: 2008-03-18
Forum posts: 45
Re: Loading a bitmap

Hi vijay,

Thanks.
What i am doing is i have created two bmp images and i put that images in gfx folder of our application. I have added some code im MMP file also
which is shown below:

START BITMAP myimage.mbm
TARGETPATH \resource\apps
SOURCEPATH ..\gfx
SOURCE 8 blueflower.bmp redflower.bmp
END

Here blueflower.bmp redflower.bmp are the images that i have to display in mobile screen.
I don't know whether it is correct or not. Can you tell me when mbm file get generated? How to load these images on the mobile screen?

I am very new to this. Please help me.

Regards,
Sweta


NEWBIE OF SYMBIAN

Thu, 2008-07-31 06:38
Joined: 2007-06-16
Forum posts: 52
Re: Loading a bitmap


An mbm file is a MultiBitMap File
While Compiling the application your "myimage.mbm" will get generated

you can find this file in EPOCROOT/data/system/apps/yourAppname

other wise u can create ur own mbm file from command prompt(u can search this in forums)

Give the same path to load the first image as shown below

iBitmap1 = iEikonEnv->CreateBitmapL(myimageMbmPath,0 );//to load blueflower

iBitmap2 = iEikonEnv->CreateBitmapL(myimageMbmPath,1 );//to load redlower

then draw the bitmaps

gc.DrawBitmap(TRect(TPoint(0,0,50,50), iBitmap1);

gc.DrawBitmap(TRect(TPoint(51,51,100,100)), iBitmap2);

ThabX&Regards
vijay


ready to face

Thu, 2008-07-31 07:24
Joined: 2008-03-18
Forum posts: 45
Re: Loading a bitmap

Hi vijay,

May i know what is the type of iBitmap1 and iEikonEnv

Regards,
Sweta


NEWBIE OF SYMBIAN

Thu, 2008-07-31 09:45
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2006
Re: Loading a bitmap

Have you just tried to search for CreateBitmapL in the SDK documentation ?


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Thu, 2008-07-31 10:54
Joined: 2007-06-16
Forum posts: 52
Re: Loading a bitmap


Hi..

CFbsBitmap ,return type of iEikonEnv->CreateBitmapL()


ready to face

Fri, 2008-08-01 05:27
Joined: 2007-02-12
Forum posts: 27
Re: Loading a bitmap

Hi,

Please check this example

It will help you.

http://www.newlc.com/An-application-for-Series-60-a.html


Regards,
Pankaj.

The best place to find the helping hand is at the end of your arm!!!

Fri, 2008-08-01 10:04
Joined: 2007-06-21
Forum posts: 48
Re: Loading a bitmap

Hi...

u can declare like this

CFbsBitmap* iBitmap1;

CFbsBitmap* iBitmap2;

iEikonEnv this variable is available in container class u can directly use no need to declare the type

Regards,
Sri...

  • Login to reply to this topic.