How to scale bitmaps ?

Login to reply to this topic.
Mon, 2005-10-03 05:06
Joined: 2005-08-24
Forum posts: 34
Hello folks,

Can anyone tell me how to implement the Scale function of CBitmapScaler to scale bitmaps ?

The Scale function described in SDK help is in 2 ways:

Code:
void Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TBool aMaintainAspectRatio=ETrue);

void Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, const TSize& aDestinationSize, TBool aMaintainAspectRatio=ETrue);


If anyone has used any of the above methods to scale bitmaps especially how to deal with 'TRequestStatus' parameter then please kindly provide it




Many Thanks,

Yogesh

Thu, 2006-11-02 08:38
Joined: 2004-06-29
Forum posts: 109
Re: How to scale bitmaps ?
Hi Yogesh,

these methods are socalled "Asynchronous". This means you do not receive the result immediately, but later via a callback. Please read on "Active Objects" to find out how to use the TRequestStatus with Active Objects.

BTW, I have used it successful, but only for small pictures. When trying to scale down large images >0.5 Megapixel, the call returns with KErrNoMemory. Once it works for you, do you see the same?

br, Marcel
  • Login to reply to this topic.