Have a look at Bitmap.CreateScaledBitmap(Bitmap src, int dstWidth,
int dstHeight, boolean filter). You should be able to use that to
scale it into your ImageView dimensions before setting it.
However, ImageView.ScaleType.CENTER should give you what you want even
without the extra bm creation.
--
BitmapFactory.Options bf = new BitmapFactory.Options();
bf.inSampleSize = 4;
Bitmap bmp = BitmapFactory.decodeFile(path, bf);
This will scale your bitmap to 1/4th of the original size
Thanks and Regards,
Kumar Bibek
On Jun 12, 2:21 pm, pawan nimje wrote:
> I tried this method [ Bitmap.createScal
I tried this method [ Bitmap.createScaledBitmap].. its working ..but the
problem is aspect ratio is not maintained ...
On Thu, Jun 10, 2010 at 1:12 PM, Goran Genter wrote:
>
>
> On Jun 10, 6:20 am, pawan nimje wrote:
> >
> > Can you suggest some method to pre-scale the bitmap.
>
>
> Bitmap bmpS
On Jun 10, 6:20 am, pawan nimje wrote:
>
> Can you suggest some method to pre-scale the bitmap.
Bitmap bmpScaled = Bitmap.createScaledBitmap(Bitmap bmpSource, 50, 50,
true)
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to thi
Hi Kumar Bibek,
Can you suggest some method to pre-scale the bitmap.
Thanks.
On Thu, Jun 10, 2010 at 8:24 AM, Kumar Bibek wrote:
> One tip to save some memory, pre-scale your bitmaps since it's just 50
> by 50. This would save a lot of memory, and if you are loading real
> big images, this can
One tip to save some memory, pre-scale your bitmaps since it's just 50
by 50. This would save a lot of memory, and if you are loading real
big images, this can prevent OutOfMemory errors.
Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com
On Jun 10, 6:25 am, 楊健 wrote:
> Try this meth
6 matches
Mail list logo