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
Contributor
raphaelharboun
Posts: 33
Registered: ‎08-19-2010
My Device: Not Specified
Accepted Solution

PictureScrollField + 6.0 => resized images

Hi everybody, it's me again.

 

I have an application compiled under 5.0 which workd great with touch device like storm (5.0) but which presents certain leaks when i start it under 6.0

 

I have a pictureScrollField which take pratically all the screen, under 5.0, when an image is smaller than the space allowed to the pictureScrollField, then it's just paint like this, centered on the screen but not resized.

 

Under a 6.0 device or simu (torch), the bitmap are everytime resized.

 

I checked the 5.0 Documention of PictureScrollField and it specified that "image are NOT resized"

 

Any clue ?

Please use plain text.
Contributor
raphaelharboun
Posts: 33
Registered: ‎08-19-2010
My Device: Not Specified

Re: PictureScrollField + 6.0 => resized images

I didn't find any solutions so i started creating new Bitmap from the one i dl.

like this:

 

Bitmap resizedBitmap = new Bitmap(360,480);
Graphics g = Graphics.create(resizedBitmap);
g.setColor(Color.BLACK);
g.fillRect(0, 0, 360, 480); bitmap.scaleInto(resizedBitmap, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_TO_FIT);

 

 

 

 

Please use plain text.