Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
andijmsb
Posts: 3
Registered: ‎09-04-2012
My Device: 9800
Accepted Solution

Resize Image

Hi,

I am new at blackberry development, now i want to resize my picture

Why i cant resize the pic on blackberry ? 

here is my Code

 

Bitmap oriImage = Bitmap.getBitmapResource ("IMG.png");
Bitmap newImage = new Bitmap(300, 200);
newImage.scaleInto(newImage, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FILL);
BitmapField =new BitmapField(oriImage, DrawStyle.HCENTER | Field.FIELD_HCENTER);

 

Thanks

Developer
Dionysus
Posts: 152
Registered: ‎07-28-2011
My Device: Bold 9900

Re: Resize Image

[ Edited ]
Developer
cyndrilla
Posts: 84
Registered: ‎07-22-2011
My Device: bb-9550,bb-9700

Re: Resize Image

Hi

 

Firstly welcome to the forums...

Refer to the link below to resize the bitmap.

http://supportforums.blackberry.com/t5/Java-Development/Solution-for-properly-resizing-transparent-b...

 

Thanks

-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.