How can I re-size the image stored in resource folder using code according to the display width and height of blackberry screen?
how to resize images in Black Berry according to the width and height of the display screen?
278 views Asked by ileafsolutions At
2
There are 2 answers
0
On
To scale a Bitmap
image try Bitmap.scaleInto(...)
. API Link.
Bitmap targetBm = new Bitmap(Display.getWidth(), Display.getHeight());
srcBitmap.scaleInto(targetBm, Bitmap.FILTER_BILINEAR, Bitmap.SCALE_STRETCH);
Firstly create a encoded image like this
then pass this encoded image to the below function
this will give you a encoded image. then convert it to Bitmap using