CBitmapScaler's Scale()

Login to reply to this topic.
Wed, 2008-05-21 14:44
Joined: 2006-04-19
Forum posts: 134

Hi I am trying to scale a bitmap and I am trying in this way
void ScaleBitmapL()
{
TBuf<256> mbmFileName;
mbmFileName.Copy(_L("z:\\Resource\\Apps\\TestAppBitmaps.mbm"));
User::LeaveIfError(iSrcBitmap->Load(mbmFileName, EMbmtestappbitmapsThumbnaillarge));

CBitmapScaler* bitmapScaler = CBitmapScaler::NewL();

TRequestStatus requestStatus(0);
TSize sizeOfRescale(200,220);
TBool aspectRatio = EFalse;

if(bitmapScaler)
{
bitmapScaler->Scale(&requestStatus,*iSrcBitmap,sizeOfRescale,aspectRatio);
User::WaitForRequest(requestStatus);//);// Here If I am using this then application is hanged nd if not using then nothing is happening size is intact.

}
if(requestStatus == KErrNone)
{
DrawNow();
}
}

One more thing during searching the forum and and google I came to know that I can use DrawBitmaps() and also I'll have to use Active Objects. But My problem is that I don't want to use Active objects and also can't use DrawBitmaps also as I want to store the bitmaps in object and will use later on. Can anyone help me or give some idea ? I tried it in many ways and did searching also.But all in vain

Any idea or suggestion would be a great help for me.

Thanks & Regards
Isha


"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".


Thu, 2008-05-22 05:12
Joined: 2006-04-19
Forum posts: 134
Re: CBitmapScaler's Scale()

Hi,

During searching I found this link. It may be helpfull for me but am not able to use it.

http://www.compuphase.com/graphic/scale.htm

What is the structure of PIXEL class here . Because of that I am not able to use it.
Please help me to solve it.

Thanks & Regards
Isha


"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".

  • Login to reply to this topic.